summaryrefslogtreecommitdiff
path: root/gtk/gtkcssstylefuncs.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2012-04-07 06:18:03 +0200
committerBenjamin Otte <otte@redhat.com>2012-04-17 08:59:20 +0200
commit0111b9d507bf8fd8d3fc7aa99f473e5c669298e4 (patch)
treec4d386eddd5aeb86042e48d9e4b193cb19794744 /gtk/gtkcssstylefuncs.c
parent0048c8baf550140e8e2a3ab88f000dc75ef95407 (diff)
downloadgtk+-0111b9d507bf8fd8d3fc7aa99f473e5c669298e4.tar.gz
symboliccolor: Treat it as a CssValue
.. now that it is one.
Diffstat (limited to 'gtk/gtkcssstylefuncs.c')
-rw-r--r--gtk/gtkcssstylefuncs.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/gtk/gtkcssstylefuncs.c b/gtk/gtkcssstylefuncs.c
index b1a097e90d..dcdd25d569 100644
--- a/gtk/gtkcssstylefuncs.c
+++ b/gtk/gtkcssstylefuncs.c
@@ -169,7 +169,7 @@ rgba_value_parse (GtkCssParser *parser,
GtkSymbolicColor *symbolic;
GdkRGBA rgba;
- symbolic = _gtk_css_parser_read_symbolic_color (parser);
+ symbolic = _gtk_symbolic_color_new_take_value (_gtk_css_symbolic_value_new (parser));
if (symbolic == NULL)
return FALSE;
@@ -212,12 +212,10 @@ rgba_value_compute (GtkStyleContext *context,
if (_gtk_css_value_holds (specified, GTK_TYPE_SYMBOLIC_COLOR))
{
- GtkSymbolicColor *symbolic = _gtk_css_value_get_symbolic_color (specified);
+ GtkSymbolicColor *symbolic = _gtk_css_value_get_boxed (specified);
GdkRGBA rgba;
- if (symbolic == _gtk_symbolic_color_get_current_color ())
- rgba = *_gtk_css_rgba_value_get_rgba (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_COLOR));
- else if (!gtk_symbolic_color_resolve (symbolic, NULL, &rgba))
+ if (!_gtk_style_context_resolve_color (context, symbolic, &rgba))
rgba = white;
return _gtk_css_value_new_from_boxed (GDK_TYPE_RGBA, &rgba);
@@ -234,7 +232,7 @@ color_value_parse (GtkCssParser *parser,
GtkSymbolicColor *symbolic;
GdkRGBA rgba;
- symbolic = _gtk_css_parser_read_symbolic_color (parser);
+ symbolic = _gtk_symbolic_color_new_take_value (_gtk_css_symbolic_value_new (parser));
if (symbolic == NULL)
return FALSE;
@@ -284,7 +282,7 @@ color_value_compute (GtkStyleContext *context,
if (_gtk_css_value_holds (specified, GTK_TYPE_SYMBOLIC_COLOR))
{
if (_gtk_style_context_resolve_color (context,
- _gtk_css_value_get_symbolic_color (specified),
+ _gtk_css_value_get_boxed (specified),
&rgba))
{
color.red = rgba.red * 65535. + 0.5;
@@ -305,7 +303,7 @@ symbolic_color_value_parse (GtkCssParser *parser,
{
GtkSymbolicColor *symbolic;
- symbolic = _gtk_css_parser_read_symbolic_color (parser);
+ symbolic = _gtk_symbolic_color_new_take_value (_gtk_css_symbolic_value_new (parser));
if (symbolic == NULL)
return FALSE;