[goocanvas] Fixed background color bug.



commit 410d19ff43e12773c381823de3c177c6bbcc8264
Author: Damon Chaplin <damon gnome org>
Date:   Mon Feb 14 15:19:00 2011 +0000

    Fixed background color bug.

 ChangeLog       |    5 +++++
 src/goocanvas.c |    6 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a0c9972..246b447 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2011-02-14  Damon Chaplin  <damon gnome org>
 
+	* src/goocanvas.c (goo_canvas_set_property): use gtk_widget_modify_bg()
+	instead of gtk_widget_modify_base() to change the background color.
+
+2011-02-14  Damon Chaplin  <damon gnome org>
+
 	* Released GooCanvas 1.90.3
 
 2011-02-11  Damon Chaplin  <damon gnome org>
diff --git a/src/goocanvas.c b/src/goocanvas.c
index 35e452a..aba3b6f 100644
--- a/src/goocanvas.c
+++ b/src/goocanvas.c
@@ -859,9 +859,9 @@ goo_canvas_set_property    (GObject            *object,
       break;
     case PROP_BACKGROUND_COLOR:
       if (!g_value_get_string (value))
-	gtk_widget_modify_base ((GtkWidget*) canvas, GTK_STATE_NORMAL, NULL);
+	gtk_widget_modify_bg ((GtkWidget*) canvas, GTK_STATE_NORMAL, NULL);
       else if (gdk_color_parse (g_value_get_string (value), &color))
-	gtk_widget_modify_base ((GtkWidget*) canvas, GTK_STATE_NORMAL, &color);
+	gtk_widget_modify_bg ((GtkWidget*) canvas, GTK_STATE_NORMAL, &color);
       else
 	g_warning ("Unknown color: %s", g_value_get_string (value));
       break;
@@ -870,7 +870,7 @@ goo_canvas_set_property    (GObject            *object,
       color.red   = ((rgb >> 16) & 0xFF) * 257;
       color.green = ((rgb >> 8)  & 0xFF) * 257;
       color.blue  = ((rgb)       & 0xFF) * 257;
-      gtk_widget_modify_base ((GtkWidget*) canvas, GTK_STATE_NORMAL, &color);
+      gtk_widget_modify_bg  ((GtkWidget*) canvas, GTK_STATE_NORMAL, &color);
       break;
     case PROP_INTEGER_LAYOUT:
       canvas->integer_layout = g_value_get_boolean (value);



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