forked from AuroraMiddleware/gtk
styleproperty: make background-position an array property
This commit is contained in:
parent
ed12be7e81
commit
9b04673392
@ -874,7 +874,7 @@ static GtkCssValue *
|
||||
background_position_parse (GtkCssStyleProperty *property,
|
||||
GtkCssParser *parser)
|
||||
{
|
||||
return _gtk_css_position_value_parse (parser);
|
||||
return _gtk_css_array_value_parse (parser, _gtk_css_position_value_parse, FALSE);
|
||||
}
|
||||
|
||||
static GtkCssValue *
|
||||
@ -882,7 +882,7 @@ background_position_compute (GtkCssStyleProperty *property,
|
||||
GtkStyleContext *context,
|
||||
GtkCssValue *specified)
|
||||
{
|
||||
return _gtk_css_position_value_compute (specified, context);
|
||||
return _gtk_css_array_value_compute (specified, _gtk_css_position_value_compute, context);
|
||||
}
|
||||
|
||||
/*** REGISTRATION ***/
|
||||
@ -1295,8 +1295,8 @@ _gtk_css_style_property_init_properties (void)
|
||||
background_position_compute,
|
||||
NULL,
|
||||
NULL,
|
||||
_gtk_css_position_value_new (_gtk_css_number_value_new (0, GTK_CSS_PERCENT),
|
||||
_gtk_css_number_value_new (0, GTK_CSS_PERCENT)));
|
||||
_gtk_css_array_value_new (_gtk_css_position_value_new (_gtk_css_number_value_new (0, GTK_CSS_PERCENT),
|
||||
_gtk_css_number_value_new (0, GTK_CSS_PERCENT))));
|
||||
|
||||
gtk_css_style_property_register ("border-top-color",
|
||||
GTK_CSS_PROPERTY_BORDER_TOP_COLOR,
|
||||
|
@ -134,7 +134,7 @@ _gtk_theming_background_paint (GtkThemingBackground *bg,
|
||||
double width, height;
|
||||
GtkCssRepeatStyle hrepeat, vrepeat;
|
||||
|
||||
pos = _gtk_style_context_peek_property (bg->context, GTK_CSS_PROPERTY_BACKGROUND_POSITION);
|
||||
pos = _gtk_css_array_value_get_nth (_gtk_style_context_peek_property (bg->context, GTK_CSS_PROPERTY_BACKGROUND_POSITION), 0);
|
||||
repeat = _gtk_css_array_value_get_nth (_gtk_style_context_peek_property (bg->context, GTK_CSS_PROPERTY_BACKGROUND_REPEAT), 0);
|
||||
hrepeat = _gtk_css_background_repeat_value_get_x (repeat);
|
||||
vrepeat = _gtk_css_background_repeat_value_get_y (repeat);
|
||||
|
Loading…
Reference in New Issue
Block a user