[gtk+] styleproperty: Default to transparent background-color



commit 205d0eb4da6b568b94a9e6df768569f74e240af2
Author: Benjamin Otte <otte redhat com>
Date:   Mon Sep 26 15:53:48 2011 +0200

    styleproperty: Default to transparent background-color

 gtk/gtkstyleproperty.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkstyleproperty.c b/gtk/gtkstyleproperty.c
index 483feaa..a27d077 100644
--- a/gtk/gtkstyleproperty.c
+++ b/gtk/gtkstyleproperty.c
@@ -2157,6 +2157,16 @@ border_image_width_default_value (GtkStyleProperties *props,
 }
 
 static void
+background_color_default_value (GtkStyleProperties *props,
+                                GtkStateFlags       state,
+                                GValue             *value)
+{
+  GdkRGBA transparent_black = { 0, 0, 0, 0 };
+
+  g_value_set_boxed (value, &transparent_black);
+}
+
+static void
 border_color_default_value (GtkStyleProperties *props,
                             GtkStateFlags       state,
                             GValue             *value)
@@ -2561,7 +2571,7 @@ gtk_style_property_init (void)
                                           NULL,
                                           NULL,
                                           NULL,
-                                          NULL,
+                                          background_color_default_value,
                                           NULL);
 
   _gtk_style_property_register           (g_param_spec_boxed ("font-family",



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