[gtk+/wip/csoriano/pathbar-adjusdment-animation: 61/73] gtkhidingbox: remove extra widgets pixels



commit 7e751d4c28dbc141ff994b94233e06aa0e5aaaf1
Author: Carlos Soriano <csoriano gnome org>
Date:   Fri Nov 6 14:30:08 2015 +0100

    gtkhidingbox: remove extra widgets pixels
    
    I have to ask Rafał Lużyński why he added it... It makes everything
    jumpy when reallocating.
    
    Remove it for now.

 gtk/gtkhidingbox.c |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtkhidingbox.c b/gtk/gtkhidingbox.c
index b24e041..54e98c6 100644
--- a/gtk/gtkhidingbox.c
+++ b/gtk/gtkhidingbox.c
@@ -258,7 +258,6 @@ gtk_hiding_box_size_allocate (GtkWidget     *widget,
   GtkRequestedSize *sizes;
   gint size = 0;
   gint extra = 0;
-  gint n_extra_widgets = 0; /* Number of widgets that receive 1 extra px */
   gint x = 0;
   gint i;
   GList *child;
@@ -286,10 +285,7 @@ gtk_hiding_box_size_allocate (GtkWidget     *widget,
   size -= (n_visible_children - 1) * spacing;
 
   if (n_visible_children > 1)
-    {
-      extra = size / MAX (1, n_visible_children_expanding);
-      n_extra_widgets = size % n_visible_children;
-    }
+    extra = size / MAX (1, n_visible_children_expanding);
 
   x = allocation->x;
   for (i = 0, child = priv->children; child != NULL; child = child->next)
@@ -307,11 +303,6 @@ gtk_hiding_box_size_allocate (GtkWidget     *widget,
         child_allocation.width = sizes[i].minimum_size;
 
       child_allocation.height = allocation->height;
-      if (n_extra_widgets)
-        {
-          ++child_allocation.width;
-          --n_extra_widgets;
-        }
       if (direction == GTK_TEXT_DIR_RTL)
         child_allocation.x = allocation->x + allocation->width - (child_allocation.x - allocation->x) - 
child_allocation.width;
 


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