css: Support opacity

https://bugzilla.gnome.org/show_bug.cgi?id=687842
This commit is contained in:
Alexander Larsson
2013-02-06 14:29:22 +01:00
parent 7d21ec23f6
commit 366b4db791
3 changed files with 86 additions and 38 deletions

View File

@ -420,6 +420,14 @@ parse_css_direction (GtkCssStyleProperty *property,
return _gtk_css_array_value_parse (parser, parse_one_css_direction);
}
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)
{
@ -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,