mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-04 01:31:13 +00:00
GtkBox: Clipped values passed to gtk_distribute_natural_allocation() incase allocated less than requested.
This commit is contained in:
parent
8c14bf009d
commit
0cb7aa9c7b
@ -500,7 +500,7 @@ gtk_box_size_allocate (GtkWidget *widget,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Bring children up to size first */
|
/* Bring children up to size first */
|
||||||
size = gtk_distribute_natural_allocation (size, nvis_children, sizes);
|
size = gtk_distribute_natural_allocation (MAX (0, size), nvis_children, sizes);
|
||||||
|
|
||||||
/* Calculate space which hasn't distributed yet,
|
/* Calculate space which hasn't distributed yet,
|
||||||
* and is available for expanding children.
|
* and is available for expanding children.
|
||||||
@ -1004,7 +1004,7 @@ gtk_box_compute_size_for_opposing_orientation (GtkBox *box,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Bring children up to size first */
|
/* Bring children up to size first */
|
||||||
size = gtk_distribute_natural_allocation (size, nvis_children, sizes);
|
size = gtk_distribute_natural_allocation (MAX (0, size), nvis_children, sizes);
|
||||||
|
|
||||||
/* Calculate space which hasn't distributed yet,
|
/* Calculate space which hasn't distributed yet,
|
||||||
* and is available for expanding children.
|
* and is available for expanding children.
|
||||||
|
Loading…
Reference in New Issue
Block a user