From 1eb1481bdf998383bf3fc58886aff50e2e164d54 Mon Sep 17 00:00:00 2001 From: Paolo Borelli Date: Mon, 6 Jul 2015 20:03:54 +0200 Subject: css: support text-decoration-style The support is limited to underline single, double and wavy, which is what pango has today. --- gtk/gtkcssshorthandpropertyimpl.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'gtk/gtkcssshorthandpropertyimpl.c') diff --git a/gtk/gtkcssshorthandpropertyimpl.c b/gtk/gtkcssshorthandpropertyimpl.c index 61afcc6946..7598048956 100644 --- a/gtk/gtkcssshorthandpropertyimpl.c +++ b/gtk/gtkcssshorthandpropertyimpl.c @@ -836,12 +836,18 @@ parse_text_decoration (GtkCssShorthandProperty *shorthand, if (values[0] == NULL) return FALSE; } - else if (values[1] == NULL) + else if (values[1] == NULL && + (values[1] = _gtk_css_text_decoration_style_value_try_parse (parser))) { - values[1] = _gtk_css_color_value_parse (parser); if (values[1] == NULL) return FALSE; } + else if (values[2] == NULL) + { + values[2] = _gtk_css_color_value_parse (parser); + if (values[2] == NULL) + return FALSE; + } else { /* We parsed and there's still stuff left? @@ -1202,7 +1208,7 @@ _gtk_css_shorthand_property_init_properties (void) const char *transition_subproperties[] = { "transition-property", "transition-duration", "transition-delay", "transition-timing-function", NULL }; const char *animation_subproperties[] = { "animation-name", "animation-iteration-count", "animation-duration", "animation-delay", "animation-timing-function", "animation-direction", "animation-fill-mode", NULL }; - const char *text_decoration_subproperties[] = { "text-decoration-line", "text-decoration-color", NULL }; + const char *text_decoration_subproperties[] = { "text-decoration-line", "text-decoration-style", "text-decoration-color", NULL }; const char **all_subproperties; -- cgit v1.2.1