diff options
author | Paolo Borelli <pborelli@gnome.org> | 2015-07-06 20:03:54 +0200 |
---|---|---|
committer | Paolo Borelli <pborelli@gnome.org> | 2015-07-06 20:06:20 +0200 |
commit | 1eb1481bdf998383bf3fc58886aff50e2e164d54 (patch) | |
tree | adfc07490e4316f8aa89463d7e8817870fe96add /gtk/gtkcssshorthandpropertyimpl.c | |
parent | 09273d91f3a8b2e8bcbbaf5f8f81e91ff7ca1ea6 (diff) | |
download | gtk+-1eb1481bdf998383bf3fc58886aff50e2e164d54.tar.gz |
css: support text-decoration-style
The support is limited to underline single, double and wavy, which
is what pango has today.
Diffstat (limited to 'gtk/gtkcssshorthandpropertyimpl.c')
-rw-r--r-- | gtk/gtkcssshorthandpropertyimpl.c | 12 |
1 files changed, 9 insertions, 3 deletions
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; |