Fix ArdourWidgets::Pane honor child min-size

This doesn't yet correctly fix Pane::constrain_fract() constraints,
when moving the divider, but it does prevent child widgets from
being allocated with a size smaller than their minimum.

This fixes some layout and rendering issues (widgets that have
a too small allocation are not exposed and/or bleed into neighbors)
This commit is contained in:
Robin Gareus 2022-01-26 17:09:39 +01:00
parent 9ac93a4792
commit 1aca71e22b
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -321,6 +321,12 @@ Pane::reallocate (Gtk::Allocation const & alloc)
} else {
child_alloc.set_height (max (child_alloc.get_height(), (*child)->minsize));
}
} else if ((*child)->w->is_visible ()) {
if (horizontal) {
child_alloc.set_width (max (child_alloc.get_width(), cr.width));
} else {
child_alloc.set_height (max (child_alloc.get_height(), cr.height));
}
}
if ((*child)->w->is_visible ()) {