Revert "[SRUK] (StyleManager) Create a style manager"
[platform/core/uifw/dali-toolkit.git] / base / dali-toolkit / internal / controls / scrollable / scrollable-impl.cpp
index d99e5e1..451895c 100644 (file)
@@ -54,13 +54,14 @@ SignalConnectorType s4(mType, Toolkit::Scrollable::SIGNAL_SCROLL_CLAMPED,   &Scr
 
 const std::string Scrollable::SCROLLABLE_CAN_SCROLL_VERTICAL( "scrollable-can-scroll-vertical" );
 const std::string Scrollable::SCROLLABLE_CAN_SCROLL_HORIZONTAL( "scrollable-can-scroll-horizontal" );
+const Vector4     Scrollable::DEFAULT_OVERSHOOT_COLOUR(0.0f, 0.64f, 0.85f, 0.6f);
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 // Scrollable
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
 Scrollable::Scrollable()
-: ControlImpl(true/*requires touch*/),
+: Control(true/*requires touch*/),
   mPropertyRelativePosition(Property::INVALID_INDEX),
   mPropertyPositionMin(Property::INVALID_INDEX),
   mPropertyPositionMax(Property::INVALID_INDEX),
@@ -101,8 +102,11 @@ void Scrollable::EnableScrollComponent(Toolkit::Scrollable::ScrollComponentType
 {
   if(type == Toolkit::Scrollable::OvershootIndicator)
   {
-    SetOvershootEnabled(true);
-    mOvershootEnabled = true;
+    if( !mOvershootEnabled )
+    {
+      SetOvershootEnabled(true);
+      mOvershootEnabled = true;
+    }
     return;
   }
   if( mComponents.find(type) == mComponents.end() )
@@ -121,8 +125,11 @@ void Scrollable::DisableScrollComponent(Toolkit::Scrollable::ScrollComponentType
 {
   if(type == Toolkit::Scrollable::OvershootIndicator)
   {
-    SetOvershootEnabled(false);
-    mOvershootEnabled = false;
+    if( mOvershootEnabled )
+    {
+      SetOvershootEnabled(false);
+      mOvershootEnabled = false;
+    }
     return;
   }
   ComponentIter pair = mComponents.find( type );