mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 22:41:43 +00:00
boxlayout: Don't listen to comments
... when they are wrong. Instead, remove them. Or in other words: GTK4 does not have a fill child property anymore, so we don't need to run the measuring loop above to determine the size.
This commit is contained in:
parent
b004706009
commit
afe94e303a
@ -322,6 +322,13 @@ gtk_box_layout_compute_opposite_size_for_size (GtkBoxLayout *self,
|
||||
sizes = g_newa (GtkRequestedSize, nvis_children);
|
||||
extra_space = MAX (0, for_size - (nvis_children - 1) * spacing);
|
||||
|
||||
if (self->homogeneous)
|
||||
{
|
||||
size_given_to_child = extra_space / nvis_children;
|
||||
n_extra_widgets = extra_space % nvis_children;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Retrieve desired size for visible children */
|
||||
for (i = 0, child = _gtk_widget_get_first_child (widget);
|
||||
child != NULL;
|
||||
@ -358,17 +365,6 @@ gtk_box_layout_compute_opposite_size_for_size (GtkBoxLayout *self,
|
||||
i += 1;
|
||||
}
|
||||
|
||||
if (self->homogeneous)
|
||||
{
|
||||
/* We still need to run the above loop to populate the minimum sizes for
|
||||
* children that aren't going to fill.
|
||||
*/
|
||||
|
||||
size_given_to_child = extra_space / nvis_children;
|
||||
n_extra_widgets = extra_space % nvis_children;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Bring children up to size first */
|
||||
extra_space -= children_minimum_size;
|
||||
extra_space = MAX (0, extra_space);
|
||||
|
Loading…
Reference in New Issue
Block a user