From: Adeel Kazmi Date: Fri, 9 Nov 2018 10:29:40 +0000 (+0000) Subject: Merge "Parent of TextLabel does not resize when text changes" into devel/master X-Git-Tag: dali_1.3.50~2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=c021084d852437ece9f71cce1feab7933bc839da;hp=-c Merge "Parent of TextLabel does not resize when text changes" into devel/master --- c021084d852437ece9f71cce1feab7933bc839da diff --combined dali-toolkit/devel-api/layouting/layout-group-impl.cpp index cec64d4,304cec5..8ddc819 --- a/dali-toolkit/devel-api/layouting/layout-group-impl.cpp +++ b/dali-toolkit/devel-api/layouting/layout-group-impl.cpp @@@ -552,7 -552,7 +552,7 @@@ void LayoutGroup::OnInitialize( } } - RequestLayout( Dali::Toolkit::LayoutTransitionData::LayoutTransitionType::ON_OWNER_SET ); + RequestLayout( Dali::Toolkit::LayoutTransitionData::Type::ON_OWNER_SET ); } } @@@ -585,7 -585,7 +585,7 @@@ void LayoutGroup::RemoveChild( LayoutIt void LayoutGroup::ChildAddedToOwner( Actor child ) { ChildAddedToOwnerImpl( child ); - RequestLayout( Dali::Toolkit::LayoutTransitionData::LayoutTransitionType::ON_CHILD_ADD ); + RequestLayout( Dali::Toolkit::LayoutTransitionData::Type::ON_CHILD_ADD, child, Actor() ); } void LayoutGroup::ChildAddedToOwnerImpl( Actor child ) @@@ -670,7 -670,7 +670,7 @@@ void LayoutGroup::ChildRemovedFromOwner if( childLayout ) { Remove( *childLayout.Get() ); - RequestLayout( Dali::Toolkit::LayoutTransitionData::LayoutTransitionType::ON_CHILD_REMOVE ); + RequestLayout( Dali::Toolkit::LayoutTransitionData::Type::ON_CHILD_REMOVE, child, Actor() ); } } } @@@ -784,11 -784,13 +784,13 @@@ void LayoutGroup::OnMeasure( MeasureSpe // Check below will be true for legacy containers and controls with layout required set. // Other layouts will have their own OnMeasure (a checked requirement) hence not execute LayoutGroup::OnMeasure. // Controls which have set layout required will not be legacy controls hence should not have a ResizePolicy set. - if( childControl.GetChildCount() > 0 ) + // Only need to map the resize policy the first time as the Layouting system will then set it to FIXED. + if( childControl.GetChildCount() > 0 && ! mImpl->mResizePolicyMapped ) { // First pass, Static mappings that are not dependant on parent SizeNegotiationMapper::SetLayoutParametersUsingResizePolicy( childControl, childLayout, Dimension::WIDTH ); SizeNegotiationMapper::SetLayoutParametersUsingResizePolicy( childControl, childLayout, Dimension::HEIGHT ); + mImpl->mResizePolicyMapped = true; } // Second pass, if any mappings were not possible due to parent size dependancies then calculate an exact desired size for child