From 1aca71e22b2bf6a2c897d3b07175811f28f6e4ba Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 26 Jan 2022 17:09:39 +0100 Subject: [PATCH] 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) --- libs/widgets/pane.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libs/widgets/pane.cc b/libs/widgets/pane.cc index f74b245c9d..7bbdd7ecff 100644 --- a/libs/widgets/pane.cc +++ b/libs/widgets/pane.cc @@ -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 ()) {