diff options
3 files changed, 10 insertions, 9 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java index 323f873d2a..338adc5563 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2020 IBM Corporation and others. + * Copyright (c) 2000, 2021 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -973,13 +973,6 @@ void maybeEnableDarkSystemTheme() { maybeEnableDarkSystemTheme(handle); } -void maybeEnableDarkSystemTheme(long handle) { - if (display.useDarkModeExplorerTheme) { - OS.AllowDarkModeForWindow(handle, true); - OS.SetWindowTheme(handle, Display.EXPLORER, null); - } -} - void enableWidget (boolean enabled) { OS.EnableWindow (handle, enabled); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java index 5e61134cce..10c089afd9 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java @@ -1213,6 +1213,7 @@ private static final class MenuItemToolTip extends ToolTip { public MenuItemToolTip(Shell parent) { super(parent, 0); + maybeEnableDarkSystemTheme(hwndToolTip ()); } @Override diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java index e814b30370..3cb9a97aaf 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2019 IBM Corporation and others. + * Copyright (c) 2000, 2021 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -297,6 +297,13 @@ void checkParent (Widget parent) { parent.checkOpened (); } +void maybeEnableDarkSystemTheme(long handle) { + if (display.useDarkModeExplorerTheme) { + OS.AllowDarkModeForWindow(handle, true); + OS.SetWindowTheme(handle, Display.EXPLORER, null); + } +} + /** * Checks that this class can be subclassed. * <p> |