Commit ba7141b9 authored by Benjamin Otte's avatar Benjamin Otte

shorthand: Fix border query functions

We haven't been using ints there for a while, I wonder why that never
blew up...
parent 0111b9d5
......@@ -659,24 +659,27 @@ pack_border (GtkCssShorthandProperty *shorthand,
{
GtkCssStyleProperty *prop;
GtkBorder border;
GtkCssValue *v;
GValue v;
prop = _gtk_css_shorthand_property_get_subproperty (shorthand, 0);
v = (* query_func) (_gtk_css_style_property_get_id (prop), query_data);
if (v)
border.top = _gtk_css_value_get_int (v);
_gtk_style_property_query (GTK_STYLE_PROPERTY (prop), &v, query_func, query_data);
border.top = g_value_get_int (&v);
g_value_unset (&v);
prop = _gtk_css_shorthand_property_get_subproperty (shorthand, 1);
v = (* query_func) (_gtk_css_style_property_get_id (prop), query_data);
if (v)
border.right = _gtk_css_value_get_int (v);
_gtk_style_property_query (GTK_STYLE_PROPERTY (prop), &v, query_func, query_data);
border.right = g_value_get_int (&v);
g_value_unset (&v);
prop = _gtk_css_shorthand_property_get_subproperty (shorthand, 2);
v = (* query_func) (_gtk_css_style_property_get_id (prop), query_data);
if (v)
border.bottom = _gtk_css_value_get_int (v);
_gtk_style_property_query (GTK_STYLE_PROPERTY (prop), &v, query_func, query_data);
border.bottom = g_value_get_int (&v);
g_value_unset (&v);
prop = _gtk_css_shorthand_property_get_subproperty (shorthand, 3);
v = (* query_func) (_gtk_css_style_property_get_id (prop), query_data);
if (v)
border.left = _gtk_css_value_get_int (v);
_gtk_style_property_query (GTK_STYLE_PROPERTY (prop), &v, query_func, query_data);
border.left = g_value_get_int (&v);
g_value_unset (&v);
g_value_init (value, GTK_TYPE_BORDER);
g_value_set_boxed (value, &border);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment