Commit 8b9b9c22 authored by Carlos Garnacho's avatar Carlos Garnacho

GtkCssProvider: Also parse GdkColor values

This is necessary for widget style properties to work.
parent 815e3499
......@@ -2313,12 +2313,18 @@ css_provider_parse_value (GtkCssProvider *css_provider,
type = G_VALUE_TYPE (value);
if (type == GDK_TYPE_RGBA)
if (type == GDK_TYPE_RGBA ||
GdkRGBA color;
GdkColor rgb;
if (gdk_rgba_parse (&color, value_str) == TRUE)
if (type == GDK_TYPE_RGBA &&
gdk_rgba_parse (&color, value_str))
g_value_set_boxed (value, &color);
else if (type == GDK_TYPE_COLOR &&
gdk_color_parse (value_str, &rgb))
g_value_set_boxed (value, &rgb);
GtkSymbolicColor *symbolic_color;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment