mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibGUI: Notify layout system of more relevant events in Widget
This commit is contained in:
parent
a0938d62f3
commit
f35efe9bc8
Notes:
sideshowbarker
2024-07-17 09:44:25 +09:00
Author: https://github.com/frhun Commit: https://github.com/SerenityOS/serenity/commit/f35efe9bc8 Pull-request: https://github.com/SerenityOS/serenity/pull/14478 Issue: https://github.com/SerenityOS/serenity/issues/14420
1 changed files with 3 additions and 1 deletions
|
@ -407,6 +407,7 @@ void Widget::set_layout(NonnullRefPtr<Layout> layout)
|
|||
} else {
|
||||
update();
|
||||
}
|
||||
layout_relevant_change_occured();
|
||||
}
|
||||
|
||||
void Widget::do_layout()
|
||||
|
@ -1018,6 +1019,7 @@ void Widget::set_palette(Palette const& palette)
|
|||
void Widget::set_title(String title)
|
||||
{
|
||||
m_title = move(title);
|
||||
layout_relevant_change_occured();
|
||||
// For tab widget children, our change in title also affects the parent.
|
||||
if (parent_widget())
|
||||
parent_widget()->update();
|
||||
|
@ -1060,7 +1062,7 @@ void Widget::set_grabbable_margins(Margins const& margins)
|
|||
if (m_grabbable_margins == margins)
|
||||
return;
|
||||
m_grabbable_margins = margins;
|
||||
invalidate_layout();
|
||||
layout_relevant_change_occured();
|
||||
}
|
||||
|
||||
Gfx::IntRect Widget::relative_non_grabbable_rect() const
|
||||
|
|
Loading…
Reference in a new issue