[gtk+] stack: Fix node position during crossfade



commit 2f6d60d6af40d7c20550c278334a07f1cac5da05
Author: Timm Bäder <mail baedert org>
Date:   Sun Jan 29 17:55:00 2017 +0100

    stack: Fix node position during crossfade

 gtk/gtkstack.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkstack.c b/gtk/gtkstack.c
index 083c199..b161729 100644
--- a/gtk/gtkstack.c
+++ b/gtk/gtkstack.c
@@ -1919,11 +1919,16 @@ gtk_stack_snapshot_crossfade (GtkWidget   *widget,
 
   if (priv->last_visible_node)
     {
-      graphene_matrix_t identity;
+      graphene_matrix_t translate;
 
-      graphene_matrix_init_identity (&identity);
+      graphene_matrix_init_translate (&translate,
+                                      &GRAPHENE_POINT3D_INIT (
+                                        priv->last_visible_surface_allocation.x,
+                                        priv->last_visible_surface_allocation.y,
+                                        0)
+                                      );
 
-      gtk_snapshot_push_transform (snapshot, &identity, "CrossFadeStart");
+      gtk_snapshot_push_transform (snapshot, &translate, "CrossFadeStart");
       gtk_snapshot_append_node (snapshot, priv->last_visible_node);
       gtk_snapshot_pop (snapshot);
     }


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