aboutsummaryrefslogtreecommitdiff
path: root/src/ui/host/WindowHost.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-11-21 16:53:10 +0800
committercrupest <crupest@outlook.com>2021-11-21 16:53:10 +0800
commit73b90d4fe6c93a288ca6514432fe1e83ddcf4928 (patch)
tree9e97626fa23e7855f994a6c451eab65b9efc81f1 /src/ui/host/WindowHost.cpp
parenteeb1f55d5a483720441c3f44e83d02cc882a3bc0 (diff)
downloadcru-73b90d4fe6c93a288ca6514432fe1e83ddcf4928.tar.gz
cru-73b90d4fe6c93a288ca6514432fe1e83ddcf4928.tar.bz2
cru-73b90d4fe6c93a288ca6514432fe1e83ddcf4928.zip
...
Diffstat (limited to 'src/ui/host/WindowHost.cpp')
-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) {