[gtk+/wip/csoriano/pathbar-prototype: 3/8] gtkhidingbox: use internal gtk_widget_simple_clip



commit 356808a6fb82cce790e861d29b259e9ac287c16a
Author: Carlos Soriano <csoriano gnome org>
Date:   Fri Nov 6 19:05:19 2015 +0100

    gtkhidingbox: use internal gtk_widget_simple_clip

 gtk/gtkhidingbox.c |   27 ++-------------------------
 1 files changed, 2 insertions(+), 25 deletions(-)
---
diff --git a/gtk/gtkhidingbox.c b/gtk/gtkhidingbox.c
index 54e98c6..2743193 100644
--- a/gtk/gtkhidingbox.c
+++ b/gtk/gtkhidingbox.c
@@ -21,6 +21,7 @@
 #include "config.h"
 
 #include "gtkhidingboxprivate.h"
+#include "gtkwidgetprivate.h"
 #include "gtkintl.h"
 #include "gtksizerequest.h"
 #include "gtkbuildable.h"
@@ -265,7 +266,6 @@ gtk_hiding_box_size_allocate (GtkWidget     *widget,
   gint spacing = priv->spacing;
   gint n_visible_children = 0;
   gint n_visible_children_expanding = 0;
-  GtkAllocation clip, child_clip;
 
   gtk_widget_set_allocation (widget, allocation);
 
@@ -312,30 +312,7 @@ gtk_hiding_box_size_allocate (GtkWidget     *widget,
       ++i;
     }
 
-  /*
-   * Note: Here we ignore the "box-shadow" CSS property of the
-   * hiding box because we don't use it.
-   */
-  clip = *allocation;
-  if (gtk_widget_get_has_window (widget))
-    clip.x = clip.y = 0;
-
-  for (i = 0, child = priv->children; child != NULL; child = child->next)
-    {
-      child_widget = GTK_WIDGET (child->data);
-      if (gtk_widget_get_child_visible (child_widget))
-        {
-          gtk_widget_get_clip (child_widget, &child_clip);
-          gdk_rectangle_union (&child_clip, &clip, &clip);
-        }
-    }
-
-  if (gtk_widget_get_has_window (widget))
-    {
-      clip.x += allocation->x;
-      clip.y += allocation->y;
-    }
-  gtk_widget_set_clip (widget, &clip);
+  _gtk_widget_set_simple_clip (widget, NULL);
 }
 
 static void


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