mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 21:18:14 +00:00
LibGUI: Avoid some unneeded relayouts from layout relevant changes
This commit is contained in:
parent
80ea141ffe
commit
a0938d62f3
1 changed files with 6 additions and 4 deletions
|
@ -201,10 +201,12 @@ Widget::~Widget() = default;
|
|||
|
||||
void Widget::layout_relevant_change_occured()
|
||||
{
|
||||
if (auto* parent = parent_widget())
|
||||
parent->layout_relevant_change_occured();
|
||||
else
|
||||
invalidate_layout();
|
||||
if (is_visible()) {
|
||||
if (auto* parent = parent_widget())
|
||||
parent->layout_relevant_change_occured();
|
||||
else if (window())
|
||||
window()->schedule_relayout();
|
||||
}
|
||||
}
|
||||
|
||||
void Widget::child_event(Core::ChildEvent& event)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue