forked from AuroraMiddleware/gtk
shorthand: fix parsing of currentColor for border-color shorthand
Code for border-color was missing the currentColor parsing.
This commit is contained in:
parent
984834ea57
commit
09b4658c06
@ -158,6 +158,13 @@ parse_border_color (GtkCssShorthandProperty *shorthand,
|
|||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < 4; i++)
|
||||||
|
{
|
||||||
|
if (_gtk_css_parser_try (parser, "currentcolor", TRUE))
|
||||||
|
{
|
||||||
|
g_value_init (&values[i], GTK_TYPE_CSS_SPECIAL_VALUE);
|
||||||
|
g_value_set_enum (&values[i], GTK_CSS_CURRENT_COLOR);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
symbolic = _gtk_css_parser_read_symbolic_color (parser);
|
symbolic = _gtk_css_parser_read_symbolic_color (parser);
|
||||||
if (symbolic == NULL)
|
if (symbolic == NULL)
|
||||||
@ -165,6 +172,7 @@ parse_border_color (GtkCssShorthandProperty *shorthand,
|
|||||||
|
|
||||||
g_value_init (&values[i], GTK_TYPE_SYMBOLIC_COLOR);
|
g_value_init (&values[i], GTK_TYPE_SYMBOLIC_COLOR);
|
||||||
g_value_set_boxed (&values[i], symbolic);
|
g_value_set_boxed (&values[i], symbolic);
|
||||||
|
}
|
||||||
|
|
||||||
if (value_is_done_parsing (parser))
|
if (value_is_done_parsing (parser))
|
||||||
break;
|
break;
|
||||||
@ -172,7 +180,7 @@ parse_border_color (GtkCssShorthandProperty *shorthand,
|
|||||||
|
|
||||||
for (i++; i < 4; i++)
|
for (i++; i < 4; i++)
|
||||||
{
|
{
|
||||||
g_value_init (&values[i], GTK_TYPE_SYMBOLIC_COLOR);
|
g_value_init (&values[i], G_VALUE_TYPE (&values[(i - 1) >> 1]));
|
||||||
g_value_copy (&values[(i - 1) >> 1], &values[i]);
|
g_value_copy (&values[(i - 1) >> 1], &values[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user