From 794430e86cf25208f3579010035e8e51f0d5582d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Wed, 3 Jun 2026 21:59:47 +0200 Subject: [PATCH] wx: stop tree/log content from freezing the layout after a script Real cause of the log not resizing: on GTK a wxTreeCtrl/wxTextCtrl reports a natural size that grows with its content. Once a script populated the tree with many pins, the top area's minimum ballooned and consumed the vertical space, pinning the log at its minimum so it no longer tracked the window (it worked on an empty tree, hence "only after running a script"). Cap each control's min size (tree/overview 260x120, log 420x90) so content can't inflate the sizer minimum; the proportions then govern and content scrolls inside the controls. Keeps the frame sizer from the previous fix. Co-Authored-By: Claude Opus 4.8 --- src/frontends/wx/wx_frame.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/frontends/wx/wx_frame.cpp b/src/frontends/wx/wx_frame.cpp index f634542..ce09cf9 100644 --- a/src/frontends/wx/wx_frame.cpp +++ b/src/frontends/wx/wx_frame.cpp @@ -160,6 +160,15 @@ EssimFrame::EssimFrame(WxFrontend &fe) overview_->SetFont(mono); log_->SetFont(mono); + // Cap each control's minimum so its *content* can't inflate the layout's + // minimum size: on GTK a full tree/text reports a large natural size, which + // would otherwise eat all the vertical space and freeze the log at its + // minimum (it stopped resizing once a script populated the tree). With a + // modest min, the sizer proportions govern and content scrolls inside. + tree_->SetMinSize(wxSize(260, 120)); + overview_->SetMinSize(wxSize(260, 120)); + log_->SetMinSize(wxSize(420, 90)); + auto *top = new wxBoxSizer(wxHORIZONTAL); top->Add(tree_, 1, wxEXPAND | wxALL, 4); top->Add(overview_, 1, wxEXPAND | wxALL, 4);