Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiraj Modi2020-03-31 11:19:48 +0000
committerNiraj Modi2020-03-31 12:04:13 +0000
commit80282852cebf1c14cc243fad3959f98711982fa3 (patch)
tree6bb0c2e7340b2b238138b8a2d09133631ac9b5e4
parent23ae6b01089b8a2519f84cd19d16f19dd41cef85 (diff)
downloadeclipse.platform.swt-80282852cebf1c14cc243fad3959f98711982fa3.tar.gz
eclipse.platform.swt-80282852cebf1c14cc243fad3959f98711982fa3.tar.xz
eclipse.platform.swt-80282852cebf1c14cc243fad3959f98711982fa3.zip
Bug 444560 (Part 2)- [Win32] Support background color for scrollbars
- Moving to System Property approach instead of Display.setData() Change-Id: Ie991fcf4f46f9f577799ea20c289e47675b4f3d5 Signed-off-by: Niraj Modi <niraj.modi@in.ibm.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Control.java5
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java9
2 files changed, 9 insertions, 5 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 9a83d412c0..4d49269654 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, 2019 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -974,7 +974,8 @@ void enableDrag (boolean enabled) {
}
void enableDarkScrollbars() {
- if (display.getData(Display.ENABLE_DARK_SCROLLBARS) != null) {
+ String enableDarkScrollBar = System.getProperty(Display.ENABLE_DARK_SCROLLBARS);
+ if (enableDarkScrollBar != null && Boolean.valueOf(enableDarkScrollBar)) {
OS.SetWindowTheme (handle, Display.DARKMODE_EXPLORER, null);
}
}
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
index 84fb042657..59061d98fc 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2019 IBM Corporation and others.
+ * Copyright (c) 2000, 2020 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -4499,8 +4499,11 @@ public final Consumer<Error> getErrorHandler () {
}
char[] getExplorerTheme() {
- Boolean data = (Boolean) getData(Display.ENABLE_DARK_SCROLLBARS);
- return data != null && data.booleanValue () ? DARKMODE_EXPLORER : EXPLORER;
+ String enableDarkScrollBar = System.getProperty(ENABLE_DARK_SCROLLBARS);
+ if (enableDarkScrollBar != null && Boolean.valueOf(enableDarkScrollBar)) {
+ return DARKMODE_EXPLORER;
+ }
+ return EXPLORER;
}
int shiftedKey (int key) {

Back to the top