Commit 6b0f202b authored by Cosimo Cecchi's avatar Cosimo Cecchi

toolpalette: don't call gtk_style_context_set_background()

parent d4ecdbd3
......@@ -740,9 +740,6 @@ gtk_tool_palette_realize (GtkWidget *widget)
gtk_widget_set_window (widget, window);
gtk_widget_register_window (widget, window);
gtk_style_context_set_background (gtk_widget_get_style_context (widget),
window);
gtk_container_forall (GTK_CONTAINER (widget),
(GtkCallback) gtk_widget_set_parent_window,
window);
......@@ -761,6 +758,18 @@ gtk_tool_palette_adjustment_value_changed (GtkAdjustment *adjustment,
gtk_tool_palette_size_allocate (widget, &allocation);
}
static gboolean
gtk_tool_palette_draw (GtkWidget *widget,
cairo_t *cr)
{
gtk_render_background (gtk_widget_get_style_context (widget), cr,
0, 0,
gtk_widget_get_allocated_width (widget),
gtk_widget_get_allocated_height (widget));
return GTK_WIDGET_CLASS (gtk_tool_palette_parent_class)->draw (widget, cr);
}
static void
gtk_tool_palette_add (GtkContainer *container,
GtkWidget *child)
......@@ -914,6 +923,7 @@ gtk_tool_palette_class_init (GtkToolPaletteClass *cls)
wclass->get_preferred_height= gtk_tool_palette_get_preferred_height;
wclass->size_allocate = gtk_tool_palette_size_allocate;
wclass->realize = gtk_tool_palette_realize;
wclass->draw = gtk_tool_palette_draw;
cclass->add = gtk_tool_palette_add;
cclass->remove = gtk_tool_palette_remove;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment