summaryrefslogtreecommitdiff
path: root/gtk/gtkheaderbar.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-01-06 22:51:11 -0500
committerMatthias Clasen <mclasen@redhat.com>2014-01-06 23:37:18 -0500
commitc3e91c70317b337c72282a1aad68fc82a82bf9e9 (patch)
treec0169589d6f0fbbda7854ac47e04a3e376e6dc3b /gtk/gtkheaderbar.c
parentc93182c4165f9e77748b42c553ffaeee5e099aa0 (diff)
downloadgtk+-c3e91c70317b337c72282a1aad68fc82a82bf9e9.tar.gz
GtkHeaderBar: Fix positioning of pack-end widgets
This makes the positioning of pack-start and pack-end widgets symmetric.
Diffstat (limited to 'gtk/gtkheaderbar.c')
-rw-r--r--gtk/gtkheaderbar.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/gtk/gtkheaderbar.c b/gtk/gtkheaderbar.c
index bbe6faad4c..3e0f4cdb5d 100644
--- a/gtk/gtkheaderbar.c
+++ b/gtk/gtkheaderbar.c
@@ -1040,18 +1040,8 @@ gtk_header_bar_size_allocate (GtkWidget *widget,
else
x = allocation->x + allocation->width - end_width - css_borders.right;
- if (packing == GTK_PACK_START)
- {
- l = priv->children;
- i = 0;
- }
- else
- {
- l = g_list_last (priv->children);
- i = nvis_children - 1;
- }
-
- for (; l != NULL; (packing == GTK_PACK_START) ? (l = l->next) : (l = l->prev))
+ i = 0;
+ for (l = priv->children; l != NULL; l = l->next)
{
child = l->data;
if (!gtk_widget_get_visible (child->widget))
@@ -1085,10 +1075,7 @@ gtk_header_bar_size_allocate (GtkWidget *widget,
gtk_widget_size_allocate (child->widget, &child_allocation);
next:
- if (packing == GTK_PACK_START)
- i++;
- else
- i--;
+ i++;
}
}