[gtk+/wip/csoriano/pathbar-prototype: 36/46] gtkhidingbox: remove extra widgets pixels
- From: Carlos Soriano Sánchez <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/csoriano/pathbar-prototype: 36/46] gtkhidingbox: remove extra widgets pixels
- Date: Fri, 20 Nov 2015 01:54:12 +0000 (UTC)
commit 7d0b576d736b6e726bcbb1ededfafa59dcf2867f
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 e91a346..adce2a6 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]