mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 21:21:21 +00:00
center layout: Fix handling of expanding center child
We were not taking spacing into account when adjusting the size of an expanding center child, causing it to slip under the end child at times. Fixes: #3506
This commit is contained in:
parent
572649740e
commit
2d3885a44a
@ -177,7 +177,7 @@ gtk_center_layout_distribute (GtkCenterLayout *self,
|
||||
center_pos = size - center_size - end_size - spacing;
|
||||
else if (center_expand)
|
||||
{
|
||||
center_size = size - 2 * MAX (start_size, end_size);
|
||||
center_size = size - 2 * (MAX (start_size, end_size) + spacing);
|
||||
center_pos = (size / 2) - (center_size / 2) + spacing;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user