X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..c1296b82d491fbe836d56ce6dd4911cdc5dfae99:/src/gtk/win_gtk.c diff --git a/src/gtk/win_gtk.c b/src/gtk/win_gtk.c index 5416e3f177..29414cd913 100644 --- a/src/gtk/win_gtk.c +++ b/src/gtk/win_gtk.c @@ -60,6 +60,8 @@ static void gtk_pizza_draw (GtkWidget *widget, #endif /* __WXGTK20__ */ static gint gtk_pizza_expose (GtkWidget *widget, GdkEventExpose *event); +static void gtk_pizza_style_set (GtkWidget *widget, + GtkStyle *previous_style); static void gtk_pizza_add (GtkContainer *container, GtkWidget *widget); static void gtk_pizza_remove (GtkContainer *container, @@ -164,6 +166,7 @@ gtk_pizza_class_init (GtkPizzaClass *klass) widget_class->draw = gtk_pizza_draw; #endif widget_class->expose_event = gtk_pizza_expose; + widget_class->style_set = gtk_pizza_style_set; container_class->add = gtk_pizza_add; container_class->remove = gtk_pizza_remove; @@ -587,7 +590,7 @@ gtk_pizza_realize (GtkWidget *widget) widget->style = gtk_style_attach (widget->style, widget->window); gtk_style_set_background (widget->style, widget->window, GTK_STATE_NORMAL); gtk_style_set_background (widget->style, pizza->bin_window, GTK_STATE_NORMAL ); - + /* gdk_window_set_back_pixmap( widget->window, NULL, FALSE ); gdk_window_set_back_pixmap( pizza->bin_window, NULL, FALSE ); @@ -807,6 +810,18 @@ gtk_pizza_expose (GtkWidget *widget, #endif } +static void +gtk_pizza_style_set(GtkWidget *widget, GtkStyle *previous_style) +{ + if (GTK_WIDGET_REALIZED(widget)) + { + gtk_style_set_background(widget->style, widget->window, GTK_STATE_NORMAL); + gtk_style_set_background(widget->style, GTK_PIZZA(widget)->bin_window, GTK_STATE_NORMAL ); + } + + (* GTK_WIDGET_CLASS (pizza_parent_class)->style_set) (widget, previous_style); +} + static void gtk_pizza_add (GtkContainer *container, GtkWidget *widget)