aboutsummaryrefslogtreecommitdiff
path: root/src/ui/host
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/host')
-rw-r--r--src/ui/host/WindowHost.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ui/host/WindowHost.cpp b/src/ui/host/WindowHost.cpp
index 034d9bd8..9766e85e 100644
--- a/src/ui/host/WindowHost.cpp
+++ b/src/ui/host/WindowHost.cpp
@@ -181,10 +181,11 @@ void WindowHost::Relayout() {
void WindowHost::RelayoutWithSize(const Size& available_size,
bool set_window_size_to_fit_content) {
root_render_object_->Measure(
- render::MeasureRequirement{available_size,
- IsLayoutPreferToFillWindow()
- ? render::MeasureSize(available_size)
- : render::MeasureSize::NotSpecified()},
+ render::MeasureRequirement{
+ available_size,
+ !set_window_size_to_fit_content && IsLayoutPreferToFillWindow()
+ ? render::MeasureSize(available_size)
+ : render::MeasureSize::NotSpecified()},
render::MeasureSize::NotSpecified());
if (set_window_size_to_fit_content) {