[gtk+] GtkStack: Render a background



commit 02ccfb5d62430590b11b2d3e34b6100e4a6ddcda
Author: Benjamin Otte <otte redhat com>
Date:   Sat Jul 12 07:16:33 2014 +0200

    GtkStack: Render a background
    
    https://bugzilla.gnome.org/show_bug.cgi?id=733027

 gtk/gtkstack.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c
index 70611f4..a0c38bb 100644
--- a/gtk/gtkstack.c
+++ b/gtk/gtkstack.c
@@ -1774,6 +1774,18 @@ gtk_stack_draw (GtkWidget *widget,
   GtkStackPrivate *priv = gtk_stack_get_instance_private (stack);
   cairo_t *pattern_cr;
 
+  if (gtk_cairo_should_draw_window (cr, priv->view_window))
+    {
+      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->visible_child)
     {
       if (priv->transition_pos < 1.0)


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