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/gtkcssstylepropertyimpl.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/gtkcssstylepropertyimpl.c')
-rw-r--r-- | gtk/gtkcssstylepropertyimpl.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gtk/gtkcssstylepropertyimpl.c b/gtk/gtkcssstylepropertyimpl.c index 3a5dd8530f..7f2607bcfa 100644 --- a/gtk/gtkcssstylepropertyimpl.c +++ b/gtk/gtkcssstylepropertyimpl.c @@ -630,6 +630,18 @@ parse_text_decoration_line (GtkCssStyleProperty *property, } static GtkCssValue * +parse_text_decoration_style (GtkCssStyleProperty *property, + GtkCssParser *parser) +{ + GtkCssValue *value = _gtk_css_text_decoration_style_value_try_parse (parser); + + if (value == NULL) + _gtk_css_parser_error (parser, "unknown value for property"); + + return value; +} + +static GtkCssValue * box_shadow_value_parse (GtkCssStyleProperty *property, GtkCssParser *parser) { @@ -1114,6 +1126,16 @@ _gtk_css_style_property_init_properties (void) NULL, _gtk_css_color_value_new_current_color ()); + gtk_css_style_property_register ("text-decoration-style", + GTK_CSS_PROPERTY_TEXT_DECORATION_STYLE, + G_TYPE_NONE, + GTK_STYLE_PROPERTY_INHERIT, + GTK_CSS_AFFECTS_TEXT | GTK_CSS_AFFECTS_TEXT_ATTRS, + parse_text_decoration_style, + NULL, + NULL, + _gtk_css_text_decoration_style_value_new (GTK_CSS_TEXT_DECORATION_STYLE_SOLID)); + gtk_css_style_property_register ("text-shadow", GTK_CSS_PROPERTY_TEXT_SHADOW, G_TYPE_NONE, |