[gtk/wip/otte/transform: 25/41] iconview: Use new snapshot transforms



commit fa61bb7973db839ebfc25a65b3a84584cce5cb19
Author: Benjamin Otte <otte redhat com>
Date:   Thu Feb 21 05:34:12 2019 +0100

    iconview: Use new snapshot transforms

 gtk/gtkiconview.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index 52160b2a3c..cf97d48ba2 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -1679,7 +1679,8 @@ gtk_icon_view_snapshot (GtkWidget   *widget,
   offset_x = gtk_adjustment_get_value (icon_view->priv->hadjustment);
   offset_y = gtk_adjustment_get_value (icon_view->priv->vadjustment);
 
-  gtk_snapshot_offset (snapshot, - offset_x, - offset_y);
+  gtk_snapshot_save (snapshot);
+  gtk_snapshot_translate (snapshot, &GRAPHENE_POINT_INIT (- offset_x, - offset_y));
 
   gtk_icon_view_get_drag_dest_item (icon_view, &path, &dest_pos);
 
@@ -1760,6 +1761,8 @@ gtk_icon_view_snapshot (GtkWidget   *widget,
   if (icon_view->priv->doing_rubberband)
     gtk_icon_view_snapshot_rubberband (icon_view, snapshot);
 
+  gtk_snapshot_restore (snapshot);
+
   GTK_WIDGET_CLASS (gtk_icon_view_parent_class)->snapshot (widget, snapshot);
 }
 


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