Fixed scroll bar disabling issue in gallery app 01/20301/1
authorRichard Huang <r.huang@samsung.com>
Wed, 23 Apr 2014 11:09:02 +0000 (12:09 +0100)
committerDavid Steele <david.steele@partner.samsung.com>
Thu, 1 May 2014 15:01:15 +0000 (16:01 +0100)
[Issue]
[Problem] Scroll bar in ScrollView is shown when it shouldn't. It cannot be disabled
          even when Scrollable::DisableScrollComponent is called.
[Cause] The images for scroll indicator are not removed when scroll bar is disabled.
[Solution] Remove the scroll indicator images when the scroll bar is disconnected
           from scroll view.

Change-Id: I01ff966ad1484b23db5000dd48184fdb2ebe653e
Signed-off-by: David Steele <david.steele@partner.samsung.com>
dali-toolkit/internal/controls/scrollable/scrollable-impl.cpp
dali-toolkit/public-api/controls/scrollable/scroll-component-impl.h

index d122835..d99e5e1 100644 (file)
@@ -131,6 +131,9 @@ void Scrollable::DisableScrollComponent(Toolkit::Scrollable::ScrollComponentType
   {
     ScrollComponentPtr component = pair->second;
 
+    // Disconnect the scroll component first.
+    component->OnDisconnect();
+
     // Destroy ScrollComponent.
     mComponents.erase( type );
   }
index 1cb2354..4e17af6 100644 (file)
@@ -55,6 +55,11 @@ public:
    */
   Toolkit::ScrollConnector GetScrollConnector() const;
 
+  /**
+   * Called when the scroll component is disconnected from a scrollable container.
+   */
+  virtual void OnDisconnect() {}
+
 protected:
 
   /**