X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2b5f62a0b2db198609b45dec622a018dae37008e..422d0ff0bec79832494fe4605ffdcf8e87ba6c03:/src/gtk/win_gtk.c diff --git a/src/gtk/win_gtk.c b/src/gtk/win_gtk.c index fecb23b7f5..29414cd913 100644 --- a/src/gtk/win_gtk.c +++ b/src/gtk/win_gtk.c @@ -1,12 +1,12 @@ /* /////////////////////////////////////////////////////////////////////////// // Name: win_gtk.c -// Purpose: Native GTK+ widget for wxWindows, based on GtkLayout and +// Purpose: Native GTK+ widget for wxWidgets, based on GtkLayout and // GtkFixed. It makes use of the gravity window property and // therefore does not work with GTK 1.0. // Author: Robert Roebling // Id: $Id$ // Copyright: (c) 1998 Robert Roebling -// Licence: wxWindows licence +// Licence: wxWidgets licence /////////////////////////////////////////////////////////////////////////// */ #ifdef VMS @@ -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)