forked from AuroraMiddleware/gtk
GtkHeaderBar: Fix positioning of pack-end widgets
This makes the positioning of pack-start and pack-end widgets symmetric.
This commit is contained in:
parent
c93182c416
commit
c3e91c7031
@ -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++;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user