aboutsummaryrefslogtreecommitdiff
path: root/src/ui/WindowHost.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-10-29 00:29:04 +0800
committercrupest <crupest@outlook.com>2020-10-29 00:29:04 +0800
commitb4cb4fb7552d35c267bdb66913e4c822f16346ab (patch)
treea453ccaaec995b1cb56facf3998381328a069b7d /src/ui/WindowHost.cpp
parent6c77f107084908af8d10ded015ccd03663cdc893 (diff)
downloadcru-b4cb4fb7552d35c267bdb66913e4c822f16346ab.tar.gz
cru-b4cb4fb7552d35c267bdb66913e4c822f16346ab.tar.bz2
cru-b4cb4fb7552d35c267bdb66913e4c822f16346ab.zip
...
Diffstat (limited to 'src/ui/WindowHost.cpp')
-rw-r--r--src/ui/WindowHost.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ui/WindowHost.cpp b/src/ui/WindowHost.cpp
index 12eb746a..8c61d27d 100644
--- a/src/ui/WindowHost.cpp
+++ b/src/ui/WindowHost.cpp
@@ -184,8 +184,12 @@ void WindowHost::Relayout(const Size& available_size) {
render::MeasureSize::NotSpecified());
root_render_object_->Layout(Point{});
for (auto& action : after_layout_stable_action_) action();
- after_layout_stable_action_.clear();
after_layout_event_.Raise(AfterLayoutEventArgs{});
+ root_render_object_->TraverseDescendants(
+ [](render::RenderObject* render_object) {
+ render_object->OnAfterLayout();
+ });
+ after_layout_stable_action_.clear();
if constexpr (debug_flags::layout)
log::TagDebug(log_tag, u"A relayout is finished.");
}