[gtk+/wip/css-icons: 2/15] css: Add -gtk-icon-source property



commit ca7bcbdecd306f9fd5b19e49f13b2bf4cb9fa0e2
Author: Benjamin Otte <otte redhat com>
Date:   Fri May 2 21:28:36 2014 +0200

    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(+), 0 deletions(-)
---
diff --git a/gtk/gtkcssstylepropertyimpl.c b/gtk/gtkcssstylepropertyimpl.c
index 745a69e..882f5a6 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 a6bf49a..53e24c8 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,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]