cssrgbavalue: Add & use new_white()

This commit is contained in:
Timm Bäder 2019-08-23 08:14:54 +02:00
parent 19f69f6ac8
commit 5c705ae9a5
3 changed files with 8 additions and 1 deletions

View File

@ -150,6 +150,12 @@ _gtk_css_rgba_value_new_transparent (void)
return _gtk_css_value_ref (&transparent_black_singleton);
}
GtkCssValue *
_gtk_css_rgba_value_new_white (void)
{
return _gtk_css_value_ref (&opaque_white_singleton);
}
const GdkRGBA *
_gtk_css_rgba_value_get_rgba (const GtkCssValue *rgba)
{

View File

@ -28,6 +28,7 @@ G_BEGIN_DECLS
GtkCssValue * _gtk_css_rgba_value_new_from_rgba (const GdkRGBA *rgba);
GtkCssValue * _gtk_css_rgba_value_new_transparent (void);
GtkCssValue * _gtk_css_rgba_value_new_white (void);
const GdkRGBA * _gtk_css_rgba_value_get_rgba (const GtkCssValue *rgba) G_GNUC_PURE;

View File

@ -947,7 +947,7 @@ _gtk_css_style_property_init_properties (void)
GTK_CSS_AFFECTS_CONTENT | GTK_CSS_AFFECTS_SYMBOLIC_ICON,
color_parse,
color_query,
_gtk_css_color_value_new_rgba (1, 1, 1, 1));
_gtk_css_rgba_value_new_white ());
gtk_css_style_property_register ("-gtk-dpi",
GTK_CSS_PROPERTY_DPI,
G_TYPE_NONE,