mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-13 09:39:33 +01:00
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) <noreply@anthropic.com>
This commit is contained in:
1 parent
e30c8f7141
commit
cfb0b1131b
1 file changed
+1
-1
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user