diff options
author | Eric Williams | 2019-07-09 19:00:55 +0000 |
---|---|---|
committer | Eric Williams | 2019-07-16 19:46:06 +0000 |
commit | 3dc25e5c3aab865bdc61fb2db410390ce4bc86f0 (patch) | |
tree | fb136ee602a62c955712e697ef24794f4fc5bec3 | |
parent | 7493e9681dc1c9f2615aace63ac0794bf8217589 (diff) | |
download | eclipse.platform.swt-3dc25e5c3aab865bdc61fb2db410390ce4bc86f0.tar.gz eclipse.platform.swt-3dc25e5c3aab865bdc61fb2db410390ce4bc86f0.tar.xz eclipse.platform.swt-3dc25e5c3aab865bdc61fb2db410390ce4bc86f0.zip |
Bug 549117: [GTK3.24] Compare editor button has no image
Revert some internal GTK theme changes to preserve compare editor
arrow button. Only affects GTK3.24.5 and onward. This commit adds
a "swt_theming_fixes_gtk_324" file, for GTK CSS fixes that only
affect GTK3.24 and greater.
No adverse effects are observed in the IDE.
Change-Id: I4fc480ff082cd81c3f3f0e2c5ba43c54a1b0a384
Signed-off-by: Eric Williams <ericwill@redhat.com>
6 files changed, 14 insertions, 8 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_functional_gtk_320.css b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_functional_gtk_3_20.css index a74e9fbe4a..a74e9fbe4a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_functional_gtk_320.css +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_functional_gtk_3_20.css diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_functional_gtk_pre320.css b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_functional_gtk_pre_3_20.css index 4ed146c449..4ed146c449 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_functional_gtk_pre320.css +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_functional_gtk_pre_3_20.css diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_320.css b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_3_20.css index fb0cccb789..ee046e201c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_320.css +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_3_20.css @@ -22,4 +22,4 @@ entry { tab { padding-left: 6px; padding-right: 6px; -}
\ No newline at end of file +} diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_3_24_5.css b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_3_24_5.css new file mode 100644 index 0000000000..3aab49552e --- /dev/null +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_3_24_5.css @@ -0,0 +1,3 @@ +button { + padding: 4px 8px; +} diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_pre320.css b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_pre_3_20.css index 4b68e8a08b..4b68e8a08b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_pre320.css +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_pre_3_20.css diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java index ae4a1031c8..73c02b1702 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java @@ -743,8 +743,8 @@ private void overrideThemeValues () { // Load functional CSS fixes. Such as keyboard functionality for some widgets. combinedCSS.append(load.apply( GTK.GTK_VERSION < OS.VERSION(3, 20, 0) ? - "/org/eclipse/swt/internal/gtk/swt_functional_gtk_pre320.css" : - "/org/eclipse/swt/internal/gtk/swt_functional_gtk_320.css" + "/org/eclipse/swt/internal/gtk/swt_functional_gtk_pre_3_20.css" : + "/org/eclipse/swt/internal/gtk/swt_functional_gtk_3_20.css" , true)); // By default, load CSS theme fixes to overcome things such as excessive padding that breaks SWT otherwise. @@ -756,11 +756,14 @@ private void overrideThemeValues () { // - These fixes should not contain any color information, otherwise it might break a light/dark variant of the theme. // Color fixes should be put either into the theme itself or via swt user api. if (System.getProperty("org.eclipse.swt.internal.gtk.noThemingFixes") == null) { - combinedCSS.append(load.apply( - GTK.GTK_VERSION < OS.VERSION(3, 20, 0) ? - "/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_pre320.css" : - "/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_320.css" - , true)); + if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) { + combinedCSS.append(load.apply("/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_3_20.css", true)); + if (GTK.GTK_VERSION >= OS.VERSION(3, 24, 5)) { + combinedCSS.append(load.apply("/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_3_24_5.css", true)); + } + } else { + combinedCSS.append(load.apply("/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_pre_3_20.css", true)); + } } // Load CSS from user-defined CSS file. |