From 226e1cd2b2bcaef91132603346e2ee856c1bd3fd Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 2 May 2014 21:28:36 +0200 Subject: [PATCH] css: Add -gtk-icon-source property This is to be used for rendering icon content via CSS, such as spinners or checkboxes. --- gtk/gtkcssstylepropertyimpl.c | 8 ++++++++ gtk/gtkcsstypesprivate.h | 1 + 2 files changed, 9 insertions(+) diff --git a/gtk/gtkcssstylepropertyimpl.c b/gtk/gtkcssstylepropertyimpl.c index 745a69e93b..882f5a6f5a 100644 --- a/gtk/gtkcssstylepropertyimpl.c +++ b/gtk/gtkcssstylepropertyimpl.c @@ -957,6 +957,14 @@ _gtk_css_style_property_init_properties (void) NULL, _gtk_css_shadows_value_new_none ()); + gtk_css_style_property_register ("-gtk-icon-source", + GTK_CSS_PROPERTY_ICON_SOURCE, + G_TYPE_NONE, + GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE, + css_image_value_parse, + css_image_value_query, + css_image_value_assign, + _gtk_css_image_value_new (NULL)); gtk_css_style_property_register ("icon-shadow", GTK_CSS_PROPERTY_ICON_SHADOW, G_TYPE_NONE, diff --git a/gtk/gtkcsstypesprivate.h b/gtk/gtkcsstypesprivate.h index a6bf49a33d..53e24c8199 100644 --- a/gtk/gtkcsstypesprivate.h +++ b/gtk/gtkcsstypesprivate.h @@ -80,6 +80,7 @@ enum { /*< skip >*/ GTK_CSS_PROPERTY_FONT_VARIANT, GTK_CSS_PROPERTY_FONT_WEIGHT, GTK_CSS_PROPERTY_TEXT_SHADOW, + GTK_CSS_PROPERTY_ICON_SOURCE, GTK_CSS_PROPERTY_ICON_SHADOW, GTK_CSS_PROPERTY_BOX_SHADOW, GTK_CSS_PROPERTY_MARGIN_TOP,