Spreadsheet: Allow Functions Help HorizontalSplitter to resize

Using set_fixed_width prevents the splitter from resizing, so it has
been changed to set_preferred_width. Added a FIXME that I'm not
familiar enough with the codebase to tackle yet.

This addresses issue #16589
This commit is contained in:
Optimoos 2022-12-21 22:42:38 -05:00 committed by Sam Atkins
parent 2b5d7a8a72
commit d856dae07c
Notes: sideshowbarker 2024-07-17 11:30:54 +09:00

View file

@ -74,7 +74,8 @@ HelpWindow::HelpWindow(GUI::Window* parent)
auto& splitter = widget.add<GUI::HorizontalSplitter>();
auto& left_frame = splitter.add<GUI::Frame>();
left_frame.set_layout<GUI::VerticalBoxLayout>();
left_frame.set_fixed_width(100);
// FIXME: Get rid of the magic number, dynamically calculate initial size based on left frame contents
left_frame.set_preferred_width(100);
m_listview = left_frame.add<GUI::ListView>();
m_listview->set_activates_on_selection(true);
m_listview->set_model(HelpListModel::create());