Merge "Size negotiation patch 1: Removed SetPreferred size" into tizen
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / controls / scrollable / item-view / item-view-impl.cpp
index fbc3626..9ac90b9 100644 (file)
@@ -471,8 +471,7 @@ void ItemView::ActivateLayout(unsigned int layoutIndex, const Vector3& targetSiz
     if(mActiveLayout->GetItemSize(itemId, targetSize, size))
     {
       // resize immediately
     if(mActiveLayout->GetItemSize(itemId, targetSize, size))
     {
       // resize immediately
-      actor.SetResizePolicy( FIXED, ALL_DIMENSIONS );
-      actor.SetPreferredSize( size.GetVectorXY() );
+      actor.SetSize( size.GetVectorXY() );
     }
 
     mActiveLayout->ApplyConstraints(actor, itemId, durationSeconds, mScrollPositionObject, Self() );
     }
 
     mActiveLayout->ApplyConstraints(actor, itemId, durationSeconds, mScrollPositionObject, Self() );
@@ -994,8 +993,7 @@ void ItemView::SetupActor( Item item, float durationSeconds )
     Vector3 size;
     if( mActiveLayout->GetItemSize( item.first, mActiveLayoutTargetSize, size ) )
     {
     Vector3 size;
     if( mActiveLayout->GetItemSize( item.first, mActiveLayoutTargetSize, size ) )
     {
-      item.second.SetResizePolicy( FIXED, ALL_DIMENSIONS );
-      item.second.SetPreferredSize( size.GetVectorXY() );
+      item.second.SetSize( size.GetVectorXY() );
     }
 
     mActiveLayout->ApplyConstraints( item.second, item.first, durationSeconds, mScrollPositionObject, Self() );
     }
 
     mActiveLayout->ApplyConstraints( item.second, item.first, durationSeconds, mScrollPositionObject, Self() );