[gtk+] Set a default value for rgba style properties



commit 4b10167ce636549d74d482c2a3fb2e2dbf069168
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Dec 21 18:17:58 2010 -0500

    Set a default value for rgba style properties

 gtk/gtkstyleproperties.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkstyleproperties.c b/gtk/gtkstyleproperties.c
index abd9383..5dc088f 100644
--- a/gtk/gtkstyleproperties.c
+++ b/gtk/gtkstyleproperties.c
@@ -855,6 +855,12 @@ lookup_default_value (PropertyNode *node,
     g_value_set_object (value, gtk_theming_engine_load (NULL));
   else if (node->pspec->value_type == PANGO_TYPE_FONT_DESCRIPTION)
     g_value_take_boxed (value, pango_font_description_from_string ("Sans 10"));
+  else if (node->pspec->value_type == GDK_TYPE_RGBA)
+    {
+      GdkRGBA color;
+      gdk_rgba_parse (&color, "pink");
+      g_value_set_boxed (value, &color);
+    }
   else
     g_param_value_set_default (node->pspec, value);
 }



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