Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiraj Modi2021-08-17 11:59:55 +0000
committerNiraj Modi2021-08-17 15:12:41 +0000
commit7ce68ec4d4b9cdebcd29b08590297867f27baced (patch)
treef9149ab35bc5af809eabb4138360b063723969ed
parent223741644b80671a42ee4603f1463a38eac5f372 (diff)
downloadeclipse.platform.swt-7ce68ec4d4b9cdebcd29b08590297867f27baced.tar.gz
eclipse.platform.swt-7ce68ec4d4b9cdebcd29b08590297867f27baced.tar.xz
eclipse.platform.swt-7ce68ec4d4b9cdebcd29b08590297867f27baced.zip
Bug 574685 part3 - [Table|Tree|CTabFolder|ToolBar|MenuItem] Dark theme
Tool-Tips for MenuItem - Added Dark-theme Tool-Tip support for MenuItem Change-Id: I195dd15fe44e2beaebb1df034a19f3700ed9dced Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com> Reviewed-on: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/184134
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java9
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/MenuItem.java1
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Widget.java9
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>

Back to the top