mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 08:25:07 +00:00
LibGUI: Make GWindow drive relayout and do it recursively
Instead of only doing a relayout in the widget you're invalidating, we now do a recursive top-down relayout so everything gets updated. This fixes invalid results after updating a preferred size in some situations with nested layouts.
This commit is contained in:
parent
d0799f3648
commit
98a6149b4f
4 changed files with 24 additions and 14 deletions
|
@ -131,6 +131,8 @@ public:
|
|||
|
||||
virtual void save_to(AK::JsonObject&) override;
|
||||
|
||||
void schedule_relayout();
|
||||
|
||||
protected:
|
||||
GWindow(CObject* parent = nullptr);
|
||||
virtual void wm_event(GWMEvent&);
|
||||
|
@ -175,4 +177,5 @@ private:
|
|||
String m_entered_keybind;
|
||||
int m_max_keybind_length { 0 };
|
||||
HashMap<String, WeakPtr<GWidget>> m_keyboard_activation_targets;
|
||||
bool m_layout_pending { false };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue