Support AT_MOST for WRAP_CONTENT.

This commit is contained in:
Unknown W. Brackets committed 2015-12-22 20:45:50 -08:00
1 parent 85ad28d4cd
commit 8923bd46e7
1 file changed
+3 -1
+3 -1
View File
@@ -95,8 +95,10 @@ bool IsFocusMovementEnabled() {
void MeasureBySpec(Size sz, float contentWidth, MeasureSpec spec, float *measured) {
*measured = sz;
if (sz == WRAP_CONTENT) {
if (spec.type == UNSPECIFIED || spec.type == AT_MOST)
if (spec.type == UNSPECIFIED)
*measured = contentWidth;
else if (spec.type == AT_MOST)
*measured = contentWidth < spec.size ? contentWidth : spec.size;
else if (spec.type == EXACTLY)
*measured = spec.size;
} else if (sz == FILL_PARENT) {