X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Fdevel-api%2Flayouting%2Flayout-item-impl.cpp;h=217ffa66ec06c99208ea52265a130713899256ba;hp=be5b0ed3afc8a46c4c972c857354059614f94bda;hb=8e98f1407744af67cc5b5f37e979c2496468c50c;hpb=e8ea0328f92e38164592f09b9c978258622c0939 diff --git a/dali-toolkit/devel-api/layouting/layout-item-impl.cpp b/dali-toolkit/devel-api/layouting/layout-item-impl.cpp index be5b0ed..217ffa6 100644 --- a/dali-toolkit/devel-api/layouting/layout-item-impl.cpp +++ b/dali-toolkit/devel-api/layouting/layout-item-impl.cpp @@ -140,7 +140,7 @@ void LayoutItem::Measure( MeasureSpec widthMeasureSpec, MeasureSpec heightMeasur const bool needsLayout = specChanged && ( !isSpecExactly || !matchesSpecSize ); - if( forceLayout || needsLayout) + if( forceLayout || needsLayout ) { mImpl->ClearPrivateFlag( Impl::PRIVATE_FLAG_MEASURED_DIMENSION_SET ); @@ -246,6 +246,18 @@ LayoutLength LayoutItem::GetDefaultSize( LayoutLength size, MeasureSpec measureS break; } case MeasureSpec::Mode::AT_MOST: + { + LayoutLength tmp = specSize; + if( size < tmp ) + { + result = size; + } + else + { + result = specSize; + } + break; + } case MeasureSpec::Mode::EXACTLY: { result = specSize; @@ -272,6 +284,11 @@ LayoutParent* LayoutItem::GetParent() void LayoutItem::RequestLayout() { + Toolkit::Control control = Toolkit::Control::DownCast( mImpl->mOwner ); + if ( control ) + { + DALI_LOG_INFO( gLayoutFilter, Debug::Verbose, "LayoutItem::RequestLayout %s\n", control.GetName().c_str()); + } // @todo Enforce failure if called in Measure/Layout passes. mImpl->SetPrivateFlag( Impl::PRIVATE_FLAG_FORCE_LAYOUT ); Toolkit::LayoutController layoutController = Toolkit::LayoutController::Get(); @@ -283,6 +300,11 @@ bool LayoutItem::IsLayoutRequested() const return mImpl->GetPrivateFlag( Impl::PRIVATE_FLAG_FORCE_LAYOUT ); } +void LayoutItem::SetLayoutRequested() +{ + return mImpl->SetPrivateFlag( Impl::PRIVATE_FLAG_FORCE_LAYOUT ); +} + void LayoutItem::SetMeasuredDimensions( MeasuredSize measuredWidth, MeasuredSize measuredHeight ) { DALI_LOG_INFO( gLayoutFilter, Debug::Verbose, "LayoutBase::SetMeasuredDimensions width(%d) height(%d) \n",