[gtk+/wip/csoriano/pathbar-prototype: 18/23] 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: 18/23] gtkhidingbox: remove extra widgets pixels
- Date: Fri, 13 Nov 2015 23:16:20 +0000 (UTC)
commit 723021f0f960521c277013585538c85674e0c081
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 815653b..3160b25 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]