mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-29 06:51:10 +00:00
border-image: unpack the GtkGradient if there's one
So that it will eventually be resolved by the style property lookup machinery.
This commit is contained in:
parent
35fdce68e1
commit
9e5d6544ba
@ -150,7 +150,12 @@ _gtk_border_image_unpack (const GValue *value,
|
|||||||
GtkBorderImage *image = g_value_get_boxed (value);
|
GtkBorderImage *image = g_value_get_boxed (value);
|
||||||
|
|
||||||
parameter[0].name = "border-image-source";
|
parameter[0].name = "border-image-source";
|
||||||
g_value_init (¶meter[0].value, CAIRO_GOBJECT_TYPE_PATTERN);
|
|
||||||
|
if ((image != NULL) &&
|
||||||
|
(image->source_gradient != NULL))
|
||||||
|
g_value_init (¶meter[0].value, GTK_TYPE_GRADIENT);
|
||||||
|
else
|
||||||
|
g_value_init (¶meter[0].value, CAIRO_GOBJECT_TYPE_PATTERN);
|
||||||
|
|
||||||
parameter[1].name = "border-image-slice";
|
parameter[1].name = "border-image-slice";
|
||||||
g_value_init (¶meter[1].value, GTK_TYPE_BORDER);
|
g_value_init (¶meter[1].value, GTK_TYPE_BORDER);
|
||||||
@ -163,7 +168,11 @@ _gtk_border_image_unpack (const GValue *value,
|
|||||||
|
|
||||||
if (image != NULL)
|
if (image != NULL)
|
||||||
{
|
{
|
||||||
g_value_set_boxed (¶meter[0].value, image->source);
|
if (image->source_gradient != NULL)
|
||||||
|
g_value_set_boxed (¶meter[0].value, image->source_gradient);
|
||||||
|
else
|
||||||
|
g_value_set_boxed (¶meter[0].value, image->source);
|
||||||
|
|
||||||
g_value_set_boxed (¶meter[1].value, &image->slice);
|
g_value_set_boxed (¶meter[1].value, &image->slice);
|
||||||
g_value_set_boxed (¶meter[2].value, &image->repeat);
|
g_value_set_boxed (¶meter[2].value, &image->repeat);
|
||||||
g_value_set_boxed (¶meter[3].value, image->width);
|
g_value_set_boxed (¶meter[3].value, image->width);
|
||||||
|
Loading…
Reference in New Issue
Block a user