diff options
author | crupest <crupest@outlook.com> | 2020-06-29 00:31:21 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-06-29 00:31:21 +0800 |
commit | 5c3dae62b9218dbd2493ff6390db062013ca4bdc (patch) | |
tree | 3425a9efa118eaf89627e6903cecb50a3daedb1d /src/ui/UiHost.cpp | |
parent | 6b5aff7b7e50fae15cb010b340099163725f664c (diff) | |
download | cru-5c3dae62b9218dbd2493ff6390db062013ca4bdc.tar.gz cru-5c3dae62b9218dbd2493ff6390db062013ca4bdc.tar.bz2 cru-5c3dae62b9218dbd2493ff6390db062013ca4bdc.zip |
...
Diffstat (limited to 'src/ui/UiHost.cpp')
-rw-r--r-- | src/ui/UiHost.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ui/UiHost.cpp b/src/ui/UiHost.cpp index 9bde06ad..975d0ffe 100644 --- a/src/ui/UiHost.cpp +++ b/src/ui/UiHost.cpp @@ -146,14 +146,13 @@ void UiHost::InvalidatePaint() { } void UiHost::InvalidateLayout() { + log::TagDebug(log_tag, "A relayout is requested."); if (!need_layout_) { platform::native::IUiApplication::GetInstance()->InvokeLater( [resolver = this->CreateResolver()] { if (const auto host = resolver.Resolve()) { host->Relayout(); host->need_layout_ = false; - host->after_layout_event_.Raise(AfterLayoutEventArgs{}); - log::Debug("A relayout finished."); host->InvalidatePaint(); } }); @@ -171,6 +170,8 @@ void UiHost::Relayout() { render::MeasureSize::NotSpecified()}, render::MeasureSize::NotSpecified()); root_render_object_->Layout(Point{}); + after_layout_event_.Raise(AfterLayoutEventArgs{}); + log::TagDebug(log_tag, "A relayout is finished."); } bool UiHost::RequestFocusFor(Control* control) { |