From f65970b521df47a0df55f42e09abdfb4bf65c12f Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Thu, 10 May 2012 10:43:43 -0400 Subject: [PATCH] styleproperty: make background-size an array property --- gtk/gtkcssstylepropertyimpl.c | 6 +++--- gtk/gtkthemingbackground.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gtk/gtkcssstylepropertyimpl.c b/gtk/gtkcssstylepropertyimpl.c index 4c194e41cb..ad60d93d53 100644 --- a/gtk/gtkcssstylepropertyimpl.c +++ b/gtk/gtkcssstylepropertyimpl.c @@ -859,7 +859,7 @@ static GtkCssValue * background_size_parse (GtkCssStyleProperty *property, GtkCssParser *parser) { - return _gtk_css_bg_size_value_parse (parser); + return _gtk_css_array_value_parse (parser, _gtk_css_bg_size_value_parse, FALSE); } static GtkCssValue * @@ -867,7 +867,7 @@ background_size_compute (GtkCssStyleProperty *property, GtkStyleContext *context, GtkCssValue *specified) { - return _gtk_css_bg_size_value_compute (specified, context); + return _gtk_css_array_value_compute (specified, _gtk_css_bg_size_value_compute, context); } static GtkCssValue * @@ -1285,7 +1285,7 @@ _gtk_css_style_property_init_properties (void) background_size_compute, NULL, NULL, - _gtk_css_bg_size_value_new (NULL, NULL)); + _gtk_css_array_value_new (_gtk_css_bg_size_value_new (NULL, NULL))); gtk_css_style_property_register ("background-position", GTK_CSS_PROPERTY_BACKGROUND_POSITION, G_TYPE_NONE, diff --git a/gtk/gtkthemingbackground.c b/gtk/gtkthemingbackground.c index 6d006772f8..4bc5d5e2f0 100644 --- a/gtk/gtkthemingbackground.c +++ b/gtk/gtkthemingbackground.c @@ -141,7 +141,7 @@ _gtk_theming_background_paint (GtkThemingBackground *bg, width = bg->image_rect.width; height = bg->image_rect.height; - _gtk_css_bg_size_value_compute_size (_gtk_style_context_peek_property (bg->context, GTK_CSS_PROPERTY_BACKGROUND_SIZE), + _gtk_css_bg_size_value_compute_size (_gtk_css_array_value_get_nth (_gtk_style_context_peek_property (bg->context, GTK_CSS_PROPERTY_BACKGROUND_SIZE), 0), bg->image, width, height,