mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibGUI: Don't ignore invisible widgets during layout changes
As they may be setting themselves visible again in the process. Fixes inability to toggle widgets on and off in some apps.
This commit is contained in:
parent
de88e119a0
commit
1d81d2e072
Notes:
sideshowbarker
2024-07-17 09:41:37 +09:00
Author: https://github.com/thankyouverycool Commit: https://github.com/SerenityOS/serenity/commit/1d81d2e072 Pull-request: https://github.com/SerenityOS/serenity/pull/14492
1 changed files with 4 additions and 6 deletions
|
@ -201,12 +201,10 @@ Widget::~Widget() = default;
|
|||
|
||||
void Widget::layout_relevant_change_occured()
|
||||
{
|
||||
if (is_visible()) {
|
||||
if (auto* parent = parent_widget())
|
||||
parent->layout_relevant_change_occured();
|
||||
else if (window())
|
||||
window()->schedule_relayout();
|
||||
}
|
||||
if (auto* parent = parent_widget())
|
||||
parent->layout_relevant_change_occured();
|
||||
else if (window())
|
||||
window()->schedule_relayout();
|
||||
}
|
||||
|
||||
void Widget::child_event(Core::ChildEvent& event)
|
||||
|
|
Loading…
Reference in a new issue