[gtk+/wip/baedert/drawing: 209/355] icon: Stop offset'ing in snapshot



commit 5a7311b2a0a6a4d72f0124888d2f36c1b5b40fac
Author: Timm Bäder <mail baedert org>
Date:   Sat May 27 17:30:01 2017 +0200

    icon: Stop offset'ing in snapshot
    
    The snapshot is not offset to the content allocation when ->snapshot is
    called.

 gtk/gtkicon.c |    8 --------
 1 files changed, 0 insertions(+), 8 deletions(-)
---
diff --git a/gtk/gtkicon.c b/gtk/gtkicon.c
index 9d1645e..2539b28 100644
--- a/gtk/gtkicon.c
+++ b/gtk/gtkicon.c
@@ -47,21 +47,13 @@ gtk_icon_snapshot (GtkWidget   *widget,
   GtkIcon *self = GTK_ICON (widget);
   GtkCssStyle *style = gtk_css_node_get_style (gtk_widget_get_css_node (widget));
   GtkAllocation content_alloc;
-  GtkAllocation alloc;
-  int x, y;
 
-  gtk_widget_get_allocation (widget, &alloc);
   gtk_widget_get_content_allocation (widget, &content_alloc);
 
-  x = content_alloc.x - alloc.x;
-  y = content_alloc.y - alloc.y;
-
-  gtk_snapshot_offset (snapshot, x, y);
   gtk_css_style_snapshot_icon (style,
                                snapshot,
                                content_alloc.width, content_alloc.height,
                                self->image);
-  gtk_snapshot_offset (snapshot, -x, -y);
 }
 
 static void


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