styleproperty: Add a default value func for border-image-width

This is necessary because we want to use NULL as the default value. But
the default value for borders is { 0, 0, 0, 0 } and not NULL.

Fixes border-image-gradient and border-image-repeat reftests.
This commit is contained in:
Benjamin Otte 2011-06-11 09:23:34 +02:00
parent a1d19be950
commit 7dbea94fd2

View File

@ -1679,6 +1679,14 @@ pack_border_radius (GValue *value,
g_free (top_left); g_free (top_left);
} }
/*** default values ***/
static void
border_image_width_default_value (GtkStyleProperties *props,
GValue *value)
{
}
/*** API ***/ /*** API ***/
static void static void
@ -2280,11 +2288,17 @@ gtk_style_property_init (void)
"Border image slice", "Border image slice",
"Border image slice", "Border image slice",
GTK_TYPE_BORDER, 0)); GTK_TYPE_BORDER, 0));
gtk_style_properties_register_property (NULL, _gtk_style_property_register (g_param_spec_boxed ("border-image-width",
g_param_spec_boxed ("border-image-width",
"Border image width", "Border image width",
"Border image width", "Border image width",
GTK_TYPE_BORDER, 0)); GTK_TYPE_BORDER, 0),
0,
NULL,
NULL,
NULL,
NULL,
NULL,
border_image_width_default_value);
_gtk_style_property_register (g_param_spec_boxed ("border-image", _gtk_style_property_register (g_param_spec_boxed ("border-image",
"Border Image", "Border Image",
"Border Image", "Border Image",