X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fscrollable%2Fscroll-view%2Fscroll-overshoot-indicator-impl.cpp;h=04208309cfa3f2a439dad245847ac0fa79252487;hp=26c3af81170ab2e2b1ebb8d1678eed05ce91c679;hb=36a4d207b64a34433a19d78dc0c9f768f6990773;hpb=2ddfbb9e23a7c3fc30e604236c41e0ef6d2ed6a2 diff --git a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.cpp b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.cpp index 26c3af8..0420830 100644 --- a/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.cpp +++ b/dali-toolkit/internal/controls/scrollable/scroll-view/scroll-overshoot-indicator-impl.cpp @@ -18,9 +18,6 @@ // CLASS HEADER #include -// EXTERNAL INCLUDES -#include - // INTERNAL INCLUDES #include #include @@ -115,18 +112,6 @@ void ScrollOvershootIndicator::SetOvershootEffectColor( const Vector4& color ) } } -void ScrollOvershootIndicator::ClearOvershoot() -{ - if(mEffectX) - { - mEffectX->SetOvershoot(0.0f); - } - if(mEffectY) - { - mEffectY->SetOvershoot(0.0f); - } -} - ScrollOvershootEffect::ScrollOvershootEffect( bool vertical ) : mVertical(vertical) { @@ -150,7 +135,6 @@ ScrollOvershootEffectRipple::ScrollOvershootEffectRipple( bool vertical, Scrolla mOvershootOverlay.SetColor(mAttachedScrollView.GetOvershootEffectColor()); mOvershootOverlay.SetParentOrigin(ParentOrigin::TOP_LEFT); mOvershootOverlay.SetAnchorPoint(AnchorPoint::TOP_LEFT); - mOvershootOverlay.SetDrawMode(DrawMode::OVERLAY); mOvershootOverlay.SetVisible(false); } @@ -158,7 +142,7 @@ ScrollOvershootEffectRipple::ScrollOvershootEffectRipple( bool vertical, Scrolla void ScrollOvershootEffectRipple::Apply() { Actor self = mAttachedScrollView.Self(); - mOvershootProperty = self.GetPropertyIndex(IsVertical() ? Toolkit::ScrollView::SCROLL_OVERSHOOT_Y_PROPERTY_NAME : Toolkit::ScrollView::SCROLL_OVERSHOOT_X_PROPERTY_NAME); + mOvershootProperty = IsVertical() ? Toolkit::ScrollView::Property::OVERSHOOT_Y : Toolkit::ScrollView::Property::OVERSHOOT_X; // make sure height is set, since we only create a constraint for image width mOvershootOverlay.SetSize(OVERSHOOT_BOUNCE_ACTOR_DEFAULT_SIZE.width, OVERSHOOT_BOUNCE_ACTOR_DEFAULT_SIZE.height); @@ -257,12 +241,12 @@ void ScrollOvershootEffectRipple::UpdateVisibility( bool visible ) const Vector3 parentSize = self.GetCurrentSize(); if(IsVertical()) { - mOvershootOverlay.SetRotation(Quaternion(0.0f, Vector3::ZAXIS)); + mOvershootOverlay.SetOrientation( Quaternion( Radian( 0.0f ), Vector3::ZAXIS ) ); mOvershootOverlay.SetSize(parentSize.width, GetBounceActorHeight(parentSize.width), size.depth); } else { - mOvershootOverlay.SetRotation(Quaternion(1.5f * Math::PI, Vector3::ZAXIS)); + mOvershootOverlay.SetOrientation( Quaternion( Radian( 1.5f * Math::PI ), Vector3::ZAXIS ) ); mOvershootOverlay.SetSize(parentSize.height, GetBounceActorHeight(parentSize.height), size.depth); relativeOffset = Vector3(0.0f, 1.0f, 0.0f); } @@ -276,13 +260,13 @@ void ScrollOvershootEffectRipple::UpdateVisibility( bool visible ) const Vector3 parentSize = self.GetCurrentSize(); if(IsVertical()) { - mOvershootOverlay.SetRotation(Quaternion(Math::PI, Vector3::ZAXIS)); + mOvershootOverlay.SetOrientation( Quaternion( Radian( Math::PI ), Vector3::ZAXIS ) ); mOvershootOverlay.SetSize(parentSize.width, GetBounceActorHeight(parentSize.width), size.depth); relativeOffset = Vector3(1.0f, 1.0f, 0.0f); } else { - mOvershootOverlay.SetRotation(Quaternion(0.5f * Math::PI, Vector3::ZAXIS)); + mOvershootOverlay.SetOrientation( Quaternion( Radian( 0.5f * Math::PI ), Vector3::ZAXIS ) ); mOvershootOverlay.SetSize(parentSize.height, GetBounceActorHeight(parentSize.height), size.depth); relativeOffset = Vector3(1.0f, 0.0f, 0.0f); } @@ -329,7 +313,7 @@ void ScrollOvershootEffectRipple::SetOvershoot(float amount, bool animate) UpdateVisibility(true); } - float overshootAnimationSpeed = mAttachedScrollView.Self().GetProperty(Toolkit::Scrollable::PROPERTY_OVERSHOOT_ANIMATION_SPEED); + float overshootAnimationSpeed = mAttachedScrollView.Self().GetProperty(Toolkit::Scrollable::Property::OVERSHOOT_ANIMATION_SPEED); if( animate && overshootAnimationSpeed > Math::MACHINE_EPSILON_0 ) {