summaryrefslogtreecommitdiff
path: root/gtk/gtkthemingbackground.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2012-03-06 14:16:32 +0100
committerAlexander Larsson <alexl@redhat.com>2012-03-08 11:03:57 +0100
commit7603e6e47395b8e1d66522a22255637fa10d3a47 (patch)
tree0f5e58f31234cea8f6b6503e2b85b646dc603b29 /gtk/gtkthemingbackground.c
parent0ece7a5de3eae5f4d7e4d1623d191a0a0628e652 (diff)
downloadgtk+-7603e6e47395b8e1d66522a22255637fa10d3a47.tar.gz
css: Use GtkCssValues instead of GValue in the css machinery
Also, in places where we're computing a new CssValue based on an old one, make sure that if nothing changes we're returning a reference to the old one, rather than creating a new identical instance.
Diffstat (limited to 'gtk/gtkthemingbackground.c')
-rw-r--r--gtk/gtkthemingbackground.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkthemingbackground.c b/gtk/gtkthemingbackground.c
index 1e21d2dcef..161cc5a8ee 100644
--- a/gtk/gtkthemingbackground.c
+++ b/gtk/gtkthemingbackground.c
@@ -165,7 +165,7 @@ _gtk_theming_background_paint (GtkThemingBackground *bg,
double image_width, image_height;
double width, height;
- size = g_value_get_boxed (_gtk_style_context_peek_property (bg->context, "background-size"));
+ size = _gtk_css_value_get_background_size (_gtk_style_context_peek_property (bg->context, "background-size"));
gtk_style_context_get (bg->context, bg->flags,
"background-repeat", &hrepeat,
NULL);
@@ -338,7 +338,7 @@ _gtk_theming_background_init_context (GtkThemingBackground *bg)
_gtk_theming_background_apply_clip (bg);
_gtk_theming_background_apply_origin (bg);
- bg->image = g_value_get_object (_gtk_style_context_peek_property (bg->context, "background-image"));
+ bg->image = _gtk_css_value_get_image (_gtk_style_context_peek_property (bg->context, "background-image"));
}
void