1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:18:12 +00:00

LibGUI+Apps: Prevent Splitter children from being unresizable

Splitters could be resized in such an order that all their remaining
children were fixed size, leading to unfillable gaps on resize events.

HackStudio and TextEditor already had logic to handle this edge case,
so this patch factors it into a general solution for all Splitters.
At least one widget is now guaranteed to be resizeable after a child
is removed.
This commit is contained in:
thankyouverycool 2022-02-20 08:12:34 -05:00 committed by Idan Horowitz
parent c3ce562240
commit fe864af0dc
4 changed files with 24 additions and 13 deletions

View file

@ -753,7 +753,6 @@ void MainWidget::set_preview_mode(PreviewMode mode)
update_markdown_preview();
} else {
m_no_preview_action->set_checked(true);
m_editor->set_fixed_width(-1);
set_web_view_visible(false);
}
}