diff options
author | Andreas Kling <kling@serenityos.org> | 2020-02-11 11:26:25 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-11 11:53:38 +0100 |
commit | f4fa7589591878f1df8902f466f1fc6ea0e31e4a (patch) | |
tree | 571ee67813ba7de3e7d076a5a19f1bf052bc2c55 /Libraries/LibGUI | |
parent | 7aa62665a304be74b780f91cf8b06c8fd9203e2a (diff) | |
download | serenity-f4fa7589591878f1df8902f466f1fc6ea0e31e4a.zip |
LibGUI: Add a Widget::did_layout() that gets called after layout
This will allow widgets to implement post-layout behaviors.
Diffstat (limited to 'Libraries/LibGUI')
-rw-r--r-- | Libraries/LibGUI/Widget.cpp | 1 | ||||
-rw-r--r-- | Libraries/LibGUI/Widget.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibGUI/Widget.cpp b/Libraries/LibGUI/Widget.cpp index 5ca0d6d707..b4b2ccc084 100644 --- a/Libraries/LibGUI/Widget.cpp +++ b/Libraries/LibGUI/Widget.cpp @@ -245,6 +245,7 @@ void Widget::do_layout() if (!m_layout) return; m_layout->run(*this); + did_layout(); update(); } diff --git a/Libraries/LibGUI/Widget.h b/Libraries/LibGUI/Widget.h index ef2af59fdc..9ecb8fe8c1 100644 --- a/Libraries/LibGUI/Widget.h +++ b/Libraries/LibGUI/Widget.h @@ -283,6 +283,7 @@ protected: virtual void custom_layout() {} virtual void did_change_font() {} + virtual void did_layout() {} virtual void paint_event(PaintEvent&); virtual void resize_event(ResizeEvent&); virtual void show_event(ShowEvent&); |