diff options
author | Alexander Larsson <alexl@redhat.com> | 2012-03-06 14:16:32 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2012-03-08 11:03:57 +0100 |
commit | 7603e6e47395b8e1d66522a22255637fa10d3a47 (patch) | |
tree | 0f5e58f31234cea8f6b6503e2b85b646dc603b29 /gtk/gtkthemingengine.c | |
parent | 0ece7a5de3eae5f4d7e4d1623d191a0a0628e652 (diff) | |
download | gtk+-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/gtkthemingengine.c')
-rw-r--r-- | gtk/gtkthemingengine.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gtk/gtkthemingengine.c b/gtk/gtkthemingengine.c index 662f1ceab5..d5eb10be74 100644 --- a/gtk/gtkthemingengine.c +++ b/gtk/gtkthemingengine.c @@ -338,7 +338,7 @@ _gtk_theming_engine_get_context (GtkThemingEngine *engine) return engine->priv->context; } -const GValue * +GtkCssValue * _gtk_theming_engine_peek_property (GtkThemingEngine *engine, const char *property_name) { @@ -1820,17 +1820,17 @@ render_frame_internal (GtkThemingEngine *engine, render_border (cr, &border_box, &border, hidden_side, colors, border_style); } - border_style[0] = g_value_get_enum (_gtk_theming_engine_peek_property (engine, "outline-style")); + border_style[0] = _gtk_css_value_get_border_style (_gtk_theming_engine_peek_property (engine, "outline-style")); if (border_style[0] != GTK_BORDER_STYLE_NONE) { int offset; border_style[1] = border_style[2] = border_style[3] = border_style[0]; - border.top = g_value_get_int (_gtk_theming_engine_peek_property (engine, "outline-width")); + border.top = _gtk_css_value_get_int (_gtk_theming_engine_peek_property (engine, "outline-width")); border.left = border.right = border.bottom = border.top; - colors[0] = *(GdkRGBA *) g_value_get_boxed (_gtk_theming_engine_peek_property (engine, "outline-color")); + colors[0] = *_gtk_css_value_get_rgba (_gtk_theming_engine_peek_property (engine, "outline-color")); colors[3] = colors[2] = colors[1] = colors[0]; - offset = g_value_get_int (_gtk_theming_engine_peek_property (engine, "outline-offset")); + offset = _gtk_css_value_get_int (_gtk_theming_engine_peek_property (engine, "outline-offset")); /* reinit box here - outlines don't have a border radius */ _gtk_rounded_box_init_rect (&border_box, x, y, width, height); |