styleproperty: make background-size an array property
This commit is contained in:
@ -859,7 +859,7 @@ static GtkCssValue *
|
|||||||
background_size_parse (GtkCssStyleProperty *property,
|
background_size_parse (GtkCssStyleProperty *property,
|
||||||
GtkCssParser *parser)
|
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 *
|
static GtkCssValue *
|
||||||
@ -867,7 +867,7 @@ background_size_compute (GtkCssStyleProperty *property,
|
|||||||
GtkStyleContext *context,
|
GtkStyleContext *context,
|
||||||
GtkCssValue *specified)
|
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 *
|
static GtkCssValue *
|
||||||
@ -1285,7 +1285,7 @@ _gtk_css_style_property_init_properties (void)
|
|||||||
background_size_compute,
|
background_size_compute,
|
||||||
NULL,
|
NULL,
|
||||||
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_style_property_register ("background-position",
|
||||||
GTK_CSS_PROPERTY_BACKGROUND_POSITION,
|
GTK_CSS_PROPERTY_BACKGROUND_POSITION,
|
||||||
G_TYPE_NONE,
|
G_TYPE_NONE,
|
||||||
|
|||||||
@ -141,7 +141,7 @@ _gtk_theming_background_paint (GtkThemingBackground *bg,
|
|||||||
width = bg->image_rect.width;
|
width = bg->image_rect.width;
|
||||||
height = bg->image_rect.height;
|
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,
|
bg->image,
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
|
|||||||
Reference in New Issue
Block a user