auto actor = Actor::DownCast( layoutItem.GetOwner() );
if ( actor )
{
- DALI_LOG_INFO( gLogFilter, Debug::Concise, "LayoutController::RequestLayout owner[%s] layoutItem[%p] layoutTransitionType(%d)\n", actor.GetName().c_str(), &layoutItem, layoutTransitionType );
+ DALI_LOG_INFO( gLogFilter, Debug::Concise, "LayoutController::RequestLayout owner[%s] layoutItem[%p] layoutTransitionType(%d) gainedChild[%s] lostChild[%s]\n",
+ actor.GetName().c_str(), &layoutItem, layoutTransitionType,
+ gainedChild ? gainedChild.GetName().c_str() : "",
+ lostChild ? lostChild.GetName().c_str() : "");
}
else
{
continue;
}
- Actor actor = Actor::DownCast( layoutDataElement.handle );
- LayoutDataAnimator animator = layoutData.layoutAnimatorArray[ layoutDataElement.animatorIndex ];
- float width = actor.GetProperty<int>( Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION );
- float height = actor.GetProperty<int>( Toolkit::LayoutItem::ChildProperty::HEIGHT_SPECIFICATION );
-
- if( layoutDataElement.AdjustMeasuredSize( width, height, animator.animatorType ) )
+ Actor actor = layoutDataElement.handle.GetHandle();
+ if( actor )
{
- mActorSizeSpecs.push_back( ActorSizeSpec( actor ) );
- actor.SetProperty( Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION, static_cast<int>( width ) );
- actor.SetProperty( Toolkit::LayoutItem::ChildProperty::HEIGHT_SPECIFICATION, static_cast<int>( height ) );
+ LayoutDataAnimator animator = layoutData.layoutAnimatorArray[ layoutDataElement.animatorIndex ];
+ float width = actor.GetProperty<int>( Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION );
+ float height = actor.GetProperty<int>( Toolkit::LayoutItem::ChildProperty::HEIGHT_SPECIFICATION );
+
+ if( layoutDataElement.AdjustMeasuredSize( width, height, animator.animatorType ) )
+ {
+ mActorSizeSpecs.push_back( ActorSizeSpec( actor ) );
+ actor.SetProperty( Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION, static_cast<int>( width ) );
+ actor.SetProperty( Toolkit::LayoutItem::ChildProperty::HEIGHT_SPECIFICATION, static_cast<int>( height ) );
+ }
}
}
{
for( auto& actorSizeSpec : mActorSizeSpecs )
{
- Actor actor = actorSizeSpec.actor;
- actor.SetProperty( Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION, actorSizeSpec.widthSpec );
- actor.SetProperty( Toolkit::LayoutItem::ChildProperty::HEIGHT_SPECIFICATION, actorSizeSpec.heightSpec );
+ Actor actor = actorSizeSpec.actor.GetHandle();
+ if( actor )
+ {
+ actor.SetProperty( Toolkit::LayoutItem::ChildProperty::WIDTH_SPECIFICATION, actorSizeSpec.widthSpec );
+ actor.SetProperty( Toolkit::LayoutItem::ChildProperty::HEIGHT_SPECIFICATION, actorSizeSpec.heightSpec );
+ }
}
}
for( auto layoutPositionData : layoutPositionDataArray )
{
- Actor actor = Actor::DownCast( layoutPositionData.handle );
+ Actor actor = layoutPositionData.handle.GetHandle();
if( actor && ( !layoutPositionData.animated || all ) )
{
- if ( !layoutPositionData.animated )
+ if( !layoutPositionData.animated )
{
- actor.SetPosition( layoutPositionData.left, layoutPositionData.top );
- actor.SetSize( layoutPositionData.right - layoutPositionData.left, layoutPositionData.bottom - layoutPositionData.top );
+ actor.SetX( layoutPositionData.left );
+ actor.SetY( layoutPositionData.top );
+
+ actor.SetProperty( Actor::Property::SIZE_WIDTH, layoutPositionData.right - layoutPositionData.left );
+ actor.SetProperty( Actor::Property::SIZE_HEIGHT, layoutPositionData.bottom - layoutPositionData.top );
}
else
{
- actor.SetPosition( actor.GetCurrentPosition() );
- actor.SetSize( actor.GetCurrentSize() );
+ actor.SetX( actor.GetCurrentPosition().x );
+ actor.SetY( actor.GetCurrentPosition().y );
+
+ actor.SetProperty( Actor::Property::SIZE_WIDTH, actor.GetCurrentSize().x );
+ actor.SetProperty( Actor::Property::SIZE_HEIGHT, actor.GetCurrentSize().y );
}
}
}
{
if( layoutDataElement.animatorIndex >= 0 )
{
- Actor actor = Actor::DownCast( layoutDataElement.handle );
+ Actor actor = layoutDataElement.handle.GetHandle();
if ( actor )
{
LayoutDataAnimator animator = layoutAnimatorArray[ layoutDataElement.animatorIndex ];