[gtk+] stack: Fix the slide animation if the child has a non-zero allocation position



commit 4f7170fd568a53133416a3e3f0361f5cdb956334
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Nov 1 01:51:27 2013 -0400

    stack: Fix the slide animation if the child has a non-zero allocation position
    
    This can happen if the child has a margin, for instance.

 gtk/gtkstack.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c
index 5351eb3..e7cc767 100644
--- a/gtk/gtkstack.c
+++ b/gtk/gtkstack.c
@@ -1612,6 +1612,9 @@ gtk_stack_draw_slide (GtkWidget *widget,
           break;
         }
 
+      x += priv->last_visible_surface_allocation.x;
+      y += priv->last_visible_surface_allocation.y;
+
       cairo_save (cr);
       cairo_set_source_surface (cr, priv->last_visible_surface, x, y);
       cairo_paint (cr);


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