From cfb0b1131b19096207803756ca4f86d242580b4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 24 Oct 2026 12:35:55 +0200 Subject: [PATCH] UI: Clamp fixed-size views to an AT_MOST spec MeasureBySpec compared the spec against the view's previous measurement instead of its fixed size, so a fixed-size view larger than the space offered wasn't clamped unless an earlier measure happened to be larger. Co-Authored-By: Claude Opus 5.5 (1M context) --- Common/UI/View.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common/UI/View.cpp b/Common/UI/View.cpp index 74d324c16b..b14d87b7eb 100644 --- a/Common/UI/View.cpp +++ b/Common/UI/View.cpp @@ -39,7 +39,7 @@ void MeasureBySpec(Size sz, float contentDim, MeasureSpec spec, float *measured) *measured = std::max(spec.size, contentDim); else *measured = spec.size; - } else if (spec.type == EXACTLY || (spec.type == AT_MOST && *measured > spec.size)) { + } else if (spec.type == EXACTLY || (spec.type == AT_MOST && sz > spec.size)) { *measured = spec.size; } else { *measured = sz;