aboutsummaryrefslogtreecommitdiff
path: root/src/ui/UiHost.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-06-25 23:44:43 +0800
committercrupest <crupest@outlook.com>2020-06-25 23:44:43 +0800
commita48ff30f9d4ac8ae6cc9adef4a07f8d9beb69e7a (patch)
tree077a74943214da7627cca2ba9966d90d5bed144a /src/ui/UiHost.cpp
parentce0ae2c3727f83f1943d528b006eec94ad80ece9 (diff)
downloadcru-a48ff30f9d4ac8ae6cc9adef4a07f8d9beb69e7a.tar.gz
cru-a48ff30f9d4ac8ae6cc9adef4a07f8d9beb69e7a.tar.bz2
cru-a48ff30f9d4ac8ae6cc9adef4a07f8d9beb69e7a.zip
Write layout logic at half way.
Diffstat (limited to 'src/ui/UiHost.cpp')
-rw-r--r--src/ui/UiHost.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/ui/UiHost.cpp b/src/ui/UiHost.cpp
index 7047d43f..09f8fd9b 100644
--- a/src/ui/UiHost.cpp
+++ b/src/ui/UiHost.cpp
@@ -166,8 +166,11 @@ void UiHost::Relayout() {
const auto client_size = native_window
? native_window->GetClientSize()
: Size{100, 100}; // a reasonable assumed size
- root_render_object_->Measure(client_size);
- root_render_object_->Layout(Rect{Point{}, client_size});
+ root_render_object_->Measure(
+ render::MeasureRequirement{client_size,
+ render::MeasureSize::NotSpecified()},
+ render::MeasureSize::NotSpecified());
+ root_render_object_->Layout(Point{});
}
bool UiHost::RequestFocusFor(Control* control) {