styleproperty: make background-size an array property

This commit is contained in:
Cosimo Cecchi 2012-05-10 10:43:43 -04:00
parent 9b04673392
commit f65970b521
2 changed files with 4 additions and 4 deletions

View 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,

View 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,