Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Williams2019-01-08 16:46:02 -0500
committerEric Williams2019-01-11 16:31:36 -0500
commita62a49a5b27a5fe22b11293c503d9959679c1a07 (patch)
tree5b55ce22d090580144bc9d32ed11dd7a1faedecd
parent8173c6e4ba7f8e82fc0cd60fc0aae6d053aa9134 (diff)
downloadeclipse.platform.swt-a62a49a5b27a5fe22b11293c503d9959679c1a07.tar.gz
eclipse.platform.swt-a62a49a5b27a5fe22b11293c503d9959679c1a07.tar.xz
eclipse.platform.swt-a62a49a5b27a5fe22b11293c503d9959679c1a07.zip
Bug 543245: [GTK3] org.eclipse.swt.internal.gtk.theme reports system
theme, not used one Set org.eclipse.swt.internal.gtk.theme to the proper theme name if the GTK_THEME environment variable is specified. Change-Id: I610450d56243960ddcc4cc146e0da16602182a17 Signed-off-by: Eric Williams <ericwill@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
index f1ef2d01af..a2ab181c01 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
@@ -1035,7 +1035,12 @@ void createDisplay (DeviceData data) {
if (!init) SWT.error (SWT.ERROR_NO_HANDLES, null, " [gtk_init_check() failed]"); //$NON-NLS-1$
checkXimModule();
//set GTK+ Theme name as property for introspection purposes
- System.setProperty("org.eclipse.swt.internal.gtk.theme", OS.getThemeName());
+ if (OS.GTK_THEME_SET) {
+ String themeName = OS.GTK_THEME_NAME + (OS.GTK_THEME_DARK ? ":dark" : "");
+ System.setProperty("org.eclipse.swt.internal.gtk.theme", themeName);
+ } else {
+ System.setProperty("org.eclipse.swt.internal.gtk.theme", OS.getThemeName());
+ }
if (OS.isX11()) {
xDisplay = GTK.GTK4 ? 0 : GDK.gdk_x11_get_default_xdisplay();
}

Back to the top