diff options
author | Alexander Larsson <alexl@redhat.com> | 2013-02-06 14:29:22 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2013-02-07 11:11:38 +0100 |
commit | 366b4db791b03b39275c6767dede2c2089f40506 (patch) | |
tree | 6df66db98a38d910ab58450a8d0628e71ffbc3ce /gtk/gtkcssstylepropertyimpl.c | |
parent | 7d21ec23f6a750f5a7fc2342e4522c0bf817a13a (diff) | |
download | gtk+-366b4db791b03b39275c6767dede2c2089f40506.tar.gz |
css: Support opacity
https://bugzilla.gnome.org/show_bug.cgi?id=687842
Diffstat (limited to 'gtk/gtkcssstylepropertyimpl.c')
-rw-r--r-- | gtk/gtkcssstylepropertyimpl.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gtk/gtkcssstylepropertyimpl.c b/gtk/gtkcssstylepropertyimpl.c index c58edd85e1..26726d73d7 100644 --- a/gtk/gtkcssstylepropertyimpl.c +++ b/gtk/gtkcssstylepropertyimpl.c @@ -421,6 +421,14 @@ parse_css_direction (GtkCssStyleProperty *property, } static GtkCssValue * +opacity_parse (GtkCssStyleProperty *property, + GtkCssParser *parser) +{ + return _gtk_css_number_value_parse (parser, GTK_CSS_PARSE_NUMBER); +} + + +static GtkCssValue * parse_one_css_play_state (GtkCssParser *parser) { GtkCssValue *value = _gtk_css_play_state_value_try_parse (parser); @@ -1382,6 +1390,14 @@ _gtk_css_style_property_init_properties (void) NULL, NULL, _gtk_css_array_value_new (_gtk_css_fill_mode_value_new (GTK_CSS_FILL_NONE))); + gtk_css_style_property_register ("opacity", + GTK_CSS_PROPERTY_OPACITY, + G_TYPE_NONE, + GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE, + opacity_parse, + NULL, + NULL, + _gtk_css_number_value_new (1, GTK_CSS_NUMBER)); gtk_css_style_property_register ("engine", GTK_CSS_PROPERTY_ENGINE, |