From: Seoyeon Kim Date: Thu, 28 Jun 2018 07:58:28 +0000 (+0900) Subject: Fix to use width and height correctly in flex-layout-impl.cpp X-Git-Tag: dali_1.3.30~2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=336f743269f056b02394659f50a60274a9f59660;ds=inline Fix to use width and height correctly in flex-layout-impl.cpp Change-Id: I2535ead9236099f738bf07c420eb058396eace50 Signed-off-by: Seoyeon Kim --- 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; }