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>
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
similarity index 100%
rename from bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_functional_gtk_320.css
rename to 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
similarity index 100%
rename from bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_functional_gtk_pre320.css
rename to 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
similarity index 99%
rename from bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_320.css
rename to bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_3_20.css
index fb0cccb..ee046e2 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 @@
 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 0000000..3aab495
--- /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
similarity index 100%
rename from bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/swt_theming_fixes_gtk_pre320.css
rename to 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 ae4a103..73c02b1 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 @@
 	// 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 @@
 	// - 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.