From: Adeel Kazmi Date: Thu, 25 Jun 2015 14:38:10 +0000 (+0100) Subject: (ItemLayout) Remove redundant GetResizeAnimation X-Git-Tag: dali_1.0.47~17^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=17b0a845048893fb8aadd6841c72ed51a92a90e0;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git (ItemLayout) Remove redundant GetResizeAnimation Change-Id: I11688a480ad0a37519f3ff35ab6d943fed23cc8a --- diff --git a/automated-tests/src/dali-toolkit/utc-Dali-ItemLayout.cpp b/automated-tests/src/dali-toolkit/utc-Dali-ItemLayout.cpp index 67a228787c..68938b9034 100644 --- a/automated-tests/src/dali-toolkit/utc-Dali-ItemLayout.cpp +++ b/automated-tests/src/dali-toolkit/utc-Dali-ItemLayout.cpp @@ -185,18 +185,6 @@ public: // From ItemLayout { } - /** - * Retrieve the resize animation in the layout. - * - * @param[in] animation The resize animation, not owned by the layout - * @param[in] actor The actor to animate - * @param [in] size The target size. - * @param [in] durationSeconds The duration of the resizing. - */ - virtual void GetResizeAnimation(Animation& animation, Actor actor, Vector3 size, float durationSeconds) const - { - } - /** * @brief Query the scroll direction of the layout. * @return The scroll direction in degrees. diff --git a/dali-toolkit/internal/controls/scrollable/item-view/depth-layout.cpp b/dali-toolkit/internal/controls/scrollable/item-view/depth-layout.cpp index 2fa572dd60..557a0892ab 100644 --- a/dali-toolkit/internal/controls/scrollable/item-view/depth-layout.cpp +++ b/dali-toolkit/internal/controls/scrollable/item-view/depth-layout.cpp @@ -418,14 +418,6 @@ void DepthLayout::GetDefaultItemSize( unsigned int itemId, const Vector3& layout itemSize.width = itemSize.height = itemSize.depth = ( IsVertical( GetOrientation() ) ? layoutSize.width : layoutSize.height ) / static_cast( mImpl->mNumberOfColumns + 1 ); } -void DepthLayout::GetResizeAnimation(Animation& animation, Actor actor, Vector3 size, float durationSeconds) const -{ - if(animation) - { - animation.AnimateTo( Property( actor, Actor::Property::SIZE ), size ); - } -} - Degree DepthLayout::GetScrollDirection() const { Degree scrollDirection(0.0f); diff --git a/dali-toolkit/internal/controls/scrollable/item-view/depth-layout.h b/dali-toolkit/internal/controls/scrollable/item-view/depth-layout.h index c1f18f9bdc..82ce8fcd14 100644 --- a/dali-toolkit/internal/controls/scrollable/item-view/depth-layout.h +++ b/dali-toolkit/internal/controls/scrollable/item-view/depth-layout.h @@ -190,11 +190,6 @@ private: */ virtual void GetDefaultItemSize( unsigned int itemId, const Vector3& layoutSize, Vector3& itemSize ) const; - /** - * @copydoc ItemLayout::GetResizeAnimation() - */ - virtual void GetResizeAnimation(Animation& animation, Actor actor, Vector3 size, float durationSeconds) const; - /** * @copydoc ItemLayout::GetScrollDirection() */ diff --git a/dali-toolkit/internal/controls/scrollable/item-view/grid-layout.cpp b/dali-toolkit/internal/controls/scrollable/item-view/grid-layout.cpp index 9339f0a1f0..e1ca4d0411 100644 --- a/dali-toolkit/internal/controls/scrollable/item-view/grid-layout.cpp +++ b/dali-toolkit/internal/controls/scrollable/item-view/grid-layout.cpp @@ -506,23 +506,6 @@ void GridLayout::GetDefaultItemSize( unsigned int itemId, const Vector3& layoutS itemSize.height = itemSize.depth = itemSize.width * 0.75f; } -void GridLayout::GetResizeAnimation(Animation& animation, Actor actor, Vector3 size, float durationSeconds) const -{ - if(animation) - { - Vector3 currentSize( actor.GetCurrentSize() ); - Vector3 shrink( currentSize ); - - shrink.width = std::min(size.width, currentSize.width); - shrink.height = std::min(size.height, currentSize.height); - - // Do a nonlinear size animation to shrink the actor first when the actor size changes, - // so that we can avoid the actors overlapping during orientation change. - animation.AnimateTo( Property( actor, Actor::Property::SIZE ), shrink, AlphaFunction::EASE_OUT, TimePeriod( 0.0f, durationSeconds * 0.5f ) ); - animation.AnimateTo( Property( actor, Actor::Property::SIZE ), size, AlphaFunction::EASE_IN, TimePeriod( 0.0f, durationSeconds ) ); - } -} - Degree GridLayout::GetScrollDirection() const { Degree scrollDirection(0.0f); diff --git a/dali-toolkit/internal/controls/scrollable/item-view/grid-layout.h b/dali-toolkit/internal/controls/scrollable/item-view/grid-layout.h index b2b3bd9182..8cbdd33ea0 100644 --- a/dali-toolkit/internal/controls/scrollable/item-view/grid-layout.h +++ b/dali-toolkit/internal/controls/scrollable/item-view/grid-layout.h @@ -233,11 +233,6 @@ private: */ virtual void GetDefaultItemSize( unsigned int itemId, const Vector3& layoutSize, Vector3& itemSize ) const; - /** - * @copydoc ItemLayout::GetResizeAnimation() - */ - virtual void GetResizeAnimation(Animation& animation, Actor actor, Vector3 size, float durationSeconds) const; - /** * @copydoc ItemLayout::GetScrollDirection() */ diff --git a/dali-toolkit/internal/controls/scrollable/item-view/spiral-layout.cpp b/dali-toolkit/internal/controls/scrollable/item-view/spiral-layout.cpp index 731fa90797..83d2a1f8cc 100644 --- a/dali-toolkit/internal/controls/scrollable/item-view/spiral-layout.cpp +++ b/dali-toolkit/internal/controls/scrollable/item-view/spiral-layout.cpp @@ -397,14 +397,6 @@ void SpiralLayout::GetDefaultItemSize( unsigned int itemId, const Vector3& layou itemSize.height = itemSize.depth = ( itemSize.width / 4.0f ) * 3.0f; } -void SpiralLayout::GetResizeAnimation(Animation& animation, Actor actor, Vector3 size, float durationSeconds) const -{ - if(animation) - { - animation.AnimateTo( Property( actor, Actor::Property::SIZE ), size ); - } -} - Degree SpiralLayout::GetScrollDirection() const { Degree scrollDirection(0); diff --git a/dali-toolkit/internal/controls/scrollable/item-view/spiral-layout.h b/dali-toolkit/internal/controls/scrollable/item-view/spiral-layout.h index 326dcc7102..00f550a4b7 100644 --- a/dali-toolkit/internal/controls/scrollable/item-view/spiral-layout.h +++ b/dali-toolkit/internal/controls/scrollable/item-view/spiral-layout.h @@ -163,11 +163,6 @@ private: */ virtual void GetDefaultItemSize( unsigned int itemId, const Vector3& layoutSize, Vector3& itemSize ) const; - /** - * @copydoc ItemLayout::GetResizeAnimation() - */ - virtual void GetResizeAnimation(Animation& animation, Actor actor, Vector3 size, float durationSeconds) const; - /** * @copydoc ItemLayout::GetScrollDirection() */ diff --git a/dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h b/dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h index 2ed5f1ed78..cc1a2ae67b 100644 --- a/dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h +++ b/dali-toolkit/public-api/controls/scrollable/item-view/item-layout.h @@ -243,17 +243,6 @@ public: */ virtual void GetDefaultItemSize( unsigned int itemId, const Vector3& layoutSize, Vector3& itemSize ) const = 0; - /** - * @brief Retrieve the resize animation in the layout. - * - * @note This allows the layout to provide its own resize animation. - * @param[in] animation The resize animation, not owned by the layout - * @param[in] actor The actor to animate - * @param [in] size The target size. - * @param [in] durationSeconds The duration of the resizing. - */ - virtual void GetResizeAnimation(Animation& animation, Actor actor, Vector3 size, float durationSeconds) const = 0; - /** * @brief Query the scroll direction of the layout. *