]> Pileus Git - ~andy/gtk/commitdiff
scrolledwindow: Render the background so that it can be styled
authorRui Matos <tiagomatos@gmail.com>
Thu, 22 Dec 2011 14:49:50 +0000 (14:49 +0000)
committerRui Matos <tiagomatos@gmail.com>
Mon, 9 Jan 2012 16:45:44 +0000 (16:45 +0000)
gtk/gtkscrolledwindow.c

index 12f3e67c65e336c711b52cee5d3f27df25fef6d3..a86ffd966b15145ec67017a45d531e143650ceb2 100644 (file)
@@ -1200,15 +1200,19 @@ gtk_scrolled_window_draw (GtkWidget *widget,
 {
   GtkScrolledWindow *scrolled_window = GTK_SCROLLED_WINDOW (widget);
   GtkScrolledWindowPrivate *priv = scrolled_window->priv;
+  GtkStyleContext *context;
+
+  context = gtk_widget_get_style_context (widget);
+
+  gtk_render_background (context, cr, 0, 0,
+                         gtk_widget_get_allocated_width (widget),
+                         gtk_widget_get_allocated_height (widget));
 
   if (priv->shadow_type != GTK_SHADOW_NONE)
     {
       GtkAllocation relative_allocation;
-      GtkStyleContext *context;
       gboolean scrollbars_within_bevel;
 
-      context = gtk_widget_get_style_context (widget);
-
       gtk_style_context_save (context);
       gtk_style_context_add_class (context, GTK_STYLE_CLASS_FRAME);