From 336f743269f056b02394659f50a60274a9f59660 Mon Sep 17 00:00:00 2001 From: Seoyeon Kim Date: Thu, 28 Jun 2018 16:58:28 +0900 Subject: [PATCH] Fix to use width and height correctly in flex-layout-impl.cpp Change-Id: I2535ead9236099f738bf07c420eb058396eace50 Signed-off-by: Seoyeon Kim --- dali-toolkit/internal/layouting/flex-layout-impl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dali-toolkit/internal/layouting/flex-layout-impl.cpp b/dali-toolkit/internal/layouting/flex-layout-impl.cpp index 8766c58..648a7f6 100644 --- a/dali-toolkit/internal/layouting/flex-layout-impl.cpp +++ b/dali-toolkit/internal/layouting/flex-layout-impl.cpp @@ -227,12 +227,12 @@ void FlexLayout::OnMeasure( MeasureSpec widthMeasureSpec, MeasureSpec heightMeas YGNodeStyleSetMaxWidth( mRoot, width ); } - if (heightMeasureSpec.GetMode() == MeasureSpec::Mode::EXACTLY) + if ( heightMeasureSpec.GetMode() == MeasureSpec::Mode::EXACTLY ) { height = heightMeasureSpec.GetSize(); YGNodeStyleSetHeight( mRoot, height ); } - else if (widthMeasureSpec.GetMode() == MeasureSpec::Mode::AT_MOST) + else if ( heightMeasureSpec.GetMode() == MeasureSpec::Mode::AT_MOST ) { height = heightMeasureSpec.GetSize(); YGNodeStyleSetMaxHeight( mRoot, height ); @@ -306,7 +306,7 @@ YGSize FlexLayout::OnChildMeasure( YGNodeRef node, if( desiredHeight == Toolkit::ChildLayoutData::MATCH_PARENT ) { - if( innerWidth != YGUndefined) + if( innerHeight != YGUndefined) { desiredHeight = innerHeight; } -- 2.7.4