[gtk+] GtkStack: Render background and chain up gtk_widget_draw ().



commit f6695b962ff6462cfc8250f949505a17d0d9df6d
Author: William Hua <william hua canonical com>
Date:   Thu Jul 10 10:39:48 2014 -0400

    GtkStack: Render background and chain up gtk_widget_draw ().
    
    https://bugzilla.gnome.org/show_bug.cgi?id=733027

 gtk/gtkstack.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c
index 70611f4..b83825b 100644
--- a/gtk/gtkstack.c
+++ b/gtk/gtkstack.c
@@ -1772,8 +1772,14 @@ gtk_stack_draw (GtkWidget *widget,
 {
   GtkStack *stack = GTK_STACK (widget);
   GtkStackPrivate *priv = gtk_stack_get_instance_private (stack);
+  GtkStyleContext *context;
+  GtkAllocation allocation;
   cairo_t *pattern_cr;
 
+  context = gtk_widget_get_style_context (widget);
+  gtk_widget_get_allocation (widget, &allocation);
+  gtk_render_background (context, cr, 0, 0, allocation.width, allocation.height);
+
   if (priv->visible_child)
     {
       if (priv->transition_pos < 1.0)
@@ -1830,7 +1836,7 @@ gtk_stack_draw (GtkWidget *widget,
                                       cr);
     }
 
-  return TRUE;
+  return GTK_WIDGET_CLASS (gtk_stack_parent_class)->draw (widget, cr);
 }
 
 static void


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