Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Williams2017-06-27 16:15:43 +0000
committerEric Williams2017-06-27 16:15:43 +0000
commita1c0d04e0979e30a3b0fd5ac1090fbc42c7a72ac (patch)
tree5b44e6e41d7dd8e065af8b154697e8b65377ff8b
parent3497bb2c3f4d9c45919d0fc96652094cd1929cc0 (diff)
downloadeclipse.platform.swt-a1c0d04e0979e30a3b0fd5ac1090fbc42c7a72ac.tar.gz
eclipse.platform.swt-a1c0d04e0979e30a3b0fd5ac1090fbc42c7a72ac.tar.xz
eclipse.platform.swt-a1c0d04e0979e30a3b0fd5ac1090fbc42c7a72ac.zip
Bug 483097: [GTK3.16+] gtk_widget_override_color is deprecated
Now that we have alpha support on GTK3: tweak the GTK CSS foreground parsing to support rgba corner cases. This change only affects behaviour on GTK3.16+. No additional JUnit test failures occur on GTK3.16, 3.18, 3.20, or 3.22. Change-Id: Ibd1ca50d0acac2adf9be0374c4213717fc8117d7 Signed-off-by: Eric Williams <ericwill@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java2
1 files changed, 1 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 79740ce312..102aec6185 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
@@ -2075,7 +2075,7 @@ GdkRGBA gtk_css_parse_foreground (long /*int*/ provider, String precise) {
* properties and filter out things like background-color, border-color,
* etc.
*/
- String pattern = "[^-]color: rgb[a]?\\([0-9]+,[\\s]?[0-9]+,[\\s]?[0-9]+[,[\\s]*[0-9]+]?\\)";
+ String pattern = "[^-]color: rgba?\\((\\d+(,\\s?)?){3,4}\\)";
Pattern r = Pattern.compile(pattern);
Matcher m = r.matcher(searched);
if (m.find()) {

Back to the top