From 58af41b5462672b3591f0c3bcaeb7c61b845cdff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emil=20Sj=C3=B6lander?= Date: Sat, 24 Nov 2018 15:41:58 +0000 Subject: [PATCH] Set stretch to mean exact measurement --- yoga/Yoga.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/yoga/Yoga.cpp b/yoga/Yoga.cpp index 10f27bf0..f3863e15 100644 --- a/yoga/Yoga.cpp +++ b/yoga/Yoga.cpp @@ -1371,6 +1371,16 @@ static void YGNodeComputeFlexBasisForChild( auto marginColumn = YGUnwrapFloatOptional( child->getMarginForAxis(YGFlexDirectionColumn, ownerWidth)); + if (YGNodeAlignItem(node, child) == YGAlignStretch) { + if (isMainAxisRow && !YGFloatIsUndefined(height)) { + childHeight = height; + childHeightMeasureMode = YGMeasureModeExactly; + } else if (!isMainAxisRow && !YGFloatIsUndefined(width)) { + childWidth = width; + childWidthMeasureMode = YGMeasureModeExactly; + } + } + if (isRowStyleDimDefined) { childWidth = YGUnwrapFloatOptional(YGResolveValue(