]> Pileus Git - ~andy/gtk/commitdiff
styleproperty: make background-size an array property
authorCosimo Cecchi <cosimoc@gnome.org>
Thu, 10 May 2012 14:43:43 +0000 (10:43 -0400)
committerCosimo Cecchi <cosimoc@gnome.org>
Tue, 15 May 2012 17:24:40 +0000 (13:24 -0400)
gtk/gtkcssstylepropertyimpl.c
gtk/gtkthemingbackground.c

index 4c194e41cbaf1c9af3a577bfd9059a9c37aff5a6..ad60d93d53f09ce607f59ca72c12bf6cc8be3999 100644 (file)
@@ -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,
index 6d006772f8eb88d9c7dc3bfd8909e4595af5a4d5..4bc5d5e2f028ef652b9036bcc597ae71652562a6 100644 (file)
@@ -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,