summaryrefslogtreecommitdiff
path: root/gtk/gtkcssrgbavalue.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2012-07-14 20:24:46 +0200
committerBenjamin Otte <otte@redhat.com>2012-08-28 15:40:56 +0200
commit09f9fd42b4bbc35e0883771512089fd9b5673621 (patch)
treee714856fee132c47059b33ca8ee75a04e2b0f061 /gtk/gtkcssrgbavalue.c
parent9b4ed662181cabde506248cf8b344420a0300a3e (diff)
downloadgtk+-09f9fd42b4bbc35e0883771512089fd9b5673621.tar.gz
css: Fold color value computation into gtksymboliccolor.c
This gets rid of the public function _gtk_css_rgba_value_compute_from_symbolic(). The fallback is now handled using a switch statement instead of letting the caller pass the function.
Diffstat (limited to 'gtk/gtkcssrgbavalue.c')
-rw-r--r--gtk/gtkcssrgbavalue.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/gtk/gtkcssrgbavalue.c b/gtk/gtkcssrgbavalue.c
index fc1642c392..7a641a3a77 100644
--- a/gtk/gtkcssrgbavalue.c
+++ b/gtk/gtkcssrgbavalue.c
@@ -102,41 +102,3 @@ _gtk_css_rgba_value_get_rgba (const GtkCssValue *rgba)
return &rgba->rgba;
}
-
-GtkCssValue *
-_gtk_css_rgba_value_compute_from_symbolic (GtkCssValue *symbolic,
- GtkCssValue *fallback,
- GtkStyleContext *context,
- gboolean for_color_property)
-{
- GtkCssValue *resolved, *current;
-
- g_return_val_if_fail (symbolic != NULL, NULL);
-
- /* The computed value of the ‘currentColor’ keyword is the computed
- * value of the ‘color’ property. If the ‘currentColor’ keyword is
- * set on the ‘color’ property itself, it is treated as ‘color: inherit’.
- */
- if (for_color_property)
- {
- GtkStyleContext *parent = gtk_style_context_get_parent (context);
-
- if (parent)
- current = _gtk_style_context_peek_property (parent, GTK_CSS_PROPERTY_COLOR);
- else
- current = _gtk_css_style_property_get_initial_value (_gtk_css_style_property_lookup_by_id (GTK_CSS_PROPERTY_COLOR));
- }
- else
- {
- current = _gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_COLOR);
- }
-
- resolved = _gtk_style_context_resolve_color_value (context, current, symbolic);
-
- if (resolved == NULL)
- return _gtk_css_rgba_value_compute_from_symbolic (fallback, NULL, context, for_color_property);
-
- g_assert (resolved->class == &GTK_CSS_VALUE_RGBA);
- return resolved;
-}
-