aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2013-03-20 16:21:14 (EDT)
committerCarolyn MacLeod2013-04-09 10:56:46 (EDT)
commita4fc531b0667e7b6786e5326be58e0f36719b5bb (patch)
tree1451cd0c125ea72beb0972da3f85e1f908b53474
parent5d04592d2679fae964a79278571d01aa1543fae7 (diff)
downloadeclipse.platform.swt-a4fc531b0667e7b6786e5326be58e0f36719b5bb.zip
eclipse.platform.swt-a4fc531b0667e7b6786e5326be58e0f36719b5bb.tar.gz
eclipse.platform.swt-a4fc531b0667e7b6786e5326be58e0f36719b5bb.tar.bz2
Bug 403941 - invalidate style context after gtk_widget_override_*.
This is needed on later gtk 3.x versions in order for overrides to propagate to the style context and be retrievable.
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java4
2 files changed, 6 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
index ad27691..c6bad65 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
@@ -3929,6 +3929,8 @@ void setBackgroundColor (long /*int*/ handle, GdkColor color) {
rgba.blue = (color.blue & 0xFFFF) / (float)0xFFFF;
}
OS.gtk_widget_override_background_color (handle, OS.GTK_STATE_FLAG_NORMAL, rgba);
+ long /*int*/ context = OS.gtk_widget_get_style_context (handle);
+ OS.gtk_style_context_invalidate (context);
return;
}
int index = OS.GTK_STATE_NORMAL;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
index 1797edc..bb2684c 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
@@ -1646,6 +1646,8 @@ public void setData (String key, Object value) {
void setFontDescription (long /*int*/ widget, long /*int*/ font) {
if (OS.GTK3) {
OS.gtk_widget_override_font (widget, font);
+ long /*int*/ context = OS.gtk_widget_get_style_context (handle);
+ OS.gtk_style_context_invalidate (context);
} else {
OS.gtk_widget_modify_font (widget, font);
}
@@ -1666,6 +1668,8 @@ void setForegroundColor (long /*int*/ handle, GdkColor color, boolean setStateAc
rgba.blue = (color.blue & 0xFFFF) / (float)0xFFFF;
}
OS.gtk_widget_override_color (handle, OS.GTK_STATE_FLAG_NORMAL, rgba);
+ long /*int*/ context = OS.gtk_widget_get_style_context (handle);
+ OS.gtk_style_context_invalidate (context);
return;
}