mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
box gadget: Don't allow shifting too far
We don't want to let baseline adjustment shift the child out of the original allocation. This is purely a sanity measure - in practice, the baseline should always be bigger than the child_baseline.
This commit is contained in:
parent
50e923349e
commit
73307f78dc
@ -314,7 +314,7 @@ gtk_box_gadget_allocate_child (GObject *child,
|
||||
if (minimum_baseline >= 0 && baseline >= 0)
|
||||
{
|
||||
child_allocation.height = MIN(natural, allocation->height);
|
||||
child_allocation.y = allocation->y + baseline - minimum_baseline;
|
||||
child_allocation.y = allocation->y + MAX(0, baseline - minimum_baseline);
|
||||
break;
|
||||
}
|
||||
case GTK_ALIGN_CENTER:
|
||||
|
Loading…
Reference in New Issue
Block a user