summaryrefslogtreecommitdiff
path: root/gtk/gtkcssstyleproperty.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2012-04-09 03:05:12 +0200
committerBenjamin Otte <otte@redhat.com>2012-04-09 03:09:44 +0200
commit43c56d70ea247b3317c386e22407ad20769d2762 (patch)
tree33e6055ac8c630e02c8af0b69c3f5b6da388f3f7 /gtk/gtkcssstyleproperty.c
parent122cde95284f94afc39fa934c4e145a03105fda8 (diff)
downloadgtk+-43c56d70ea247b3317c386e22407ad20769d2762.tar.gz
csscustomproperty: Redo RGBA/Color parsing
This fixes custom parse functions returning RGBA values where we expected symbolic colors.
Diffstat (limited to 'gtk/gtkcssstyleproperty.c')
-rw-r--r--gtk/gtkcssstyleproperty.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gtk/gtkcssstyleproperty.c b/gtk/gtkcssstyleproperty.c
index cbbe606af9..c9d4e56450 100644
--- a/gtk/gtkcssstyleproperty.c
+++ b/gtk/gtkcssstyleproperty.c
@@ -464,6 +464,10 @@ _gtk_css_style_property_is_specified_type (GtkCssStyleProperty *property,
return TRUE;
/* XXX: Someone needs to fix that legacy */
+ if ((_gtk_css_value_holds (property->initial_value, GDK_TYPE_RGBA) ||
+ _gtk_css_value_holds (property->initial_value, GDK_TYPE_COLOR)) &&
+ type == GTK_TYPE_GRADIENT)
+ return TRUE;
if (_gtk_css_value_holds (property->initial_value, CAIRO_GOBJECT_TYPE_PATTERN) &&
type == GTK_TYPE_GRADIENT)
return TRUE;