[gtk] iconview: Use gtk_widget_set_overflow()



commit b72ee005399debc534050985929884520ed9ab63
Author: Benjamin Otte <otte redhat com>
Date:   Fri Feb 8 18:15:57 2019 +0100

    iconview: Use gtk_widget_set_overflow()

 gtk/gtkiconview.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
---
diff --git a/gtk/gtkiconview.c b/gtk/gtkiconview.c
index 3f95db58ff..52160b2a3c 100644
--- a/gtk/gtkiconview.c
+++ b/gtk/gtkiconview.c
@@ -936,6 +936,7 @@ gtk_icon_view_init (GtkIconView *icon_view)
 
   gtk_widget_set_has_surface (GTK_WIDGET (icon_view), FALSE);
   gtk_widget_set_can_focus (GTK_WIDGET (icon_view), TRUE);
+  gtk_widget_set_overflow (GTK_WIDGET (icon_view), GTK_OVERFLOW_HIDDEN);
 
   icon_view->priv->item_orientation = GTK_ORIENTATION_VERTICAL;
 
@@ -1672,14 +1673,8 @@ gtk_icon_view_snapshot (GtkWidget   *widget,
   icon_view = GTK_ICON_VIEW (widget);
 
   context = gtk_widget_get_style_context (widget);
-
   width = gtk_widget_get_width (widget);
   height = gtk_widget_get_height (widget);
-  gtk_snapshot_push_clip (snapshot,
-                          &GRAPHENE_RECT_INIT (
-                              0, 0,
-                              width, height
-                          ));
 
   offset_x = gtk_adjustment_get_value (icon_view->priv->hadjustment);
   offset_y = gtk_adjustment_get_value (icon_view->priv->vadjustment);
@@ -1765,8 +1760,6 @@ gtk_icon_view_snapshot (GtkWidget   *widget,
   if (icon_view->priv->doing_rubberband)
     gtk_icon_view_snapshot_rubberband (icon_view, snapshot);
 
-  gtk_snapshot_pop (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]