X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fscroll-bar%2Fscroll-bar-impl.cpp;h=6e301cbf5b391e286ab6b9031ea526b435dd79b7;hp=97e2680227a40926d38d3ef610a6d2a065622a61;hb=0e462103c222ad05916840bc7d7c902cf5fc82a1;hpb=761122f3e8ff2b224d2329a911a78dc35177c5ea diff --git a/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp b/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp index 97e2680..6e301cb 100755 --- a/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp +++ b/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016 Samsung Electronics Co., Ltd. + * Copyright (c) 2017 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -175,7 +175,7 @@ const char* INDICATOR_HEIGHT_POLICY_NAME[] = {"Variable", "Fixed"}; } ScrollBar::ScrollBar(Toolkit::ScrollBar::Direction direction) -: Control( ControlBehaviour( REQUIRES_STYLE_CHANGE_SIGNALS ) ), +: Control( ControlBehaviour( CONTROL_BEHAVIOUR_DEFAULT ) ), mIndicatorShowAlpha(1.0f), mDirection(direction), mScrollableObject(WeakHandleBase()), @@ -243,11 +243,16 @@ void ScrollBar::SetScrollIndicator( Actor indicator ) // Don't allow empty handle if( indicator ) { + // Remove current Indicator + if( mIndicator ) + { + Self().Remove( mIndicator ); + } mIndicator = indicator; mIndicatorFirstShow = true; - Self().Add(mIndicator); + Self().Add( mIndicator ); - EnableGestureDetection(Gesture::Type(Gesture::Pan)); + EnableGestureDetection( Gesture::Type( Gesture::Pan ) ); PanGestureDetector detector( GetPanGestureDetector() ); detector.DetachAll(); @@ -491,6 +496,8 @@ void ScrollBar::OnSizeSet( const Vector3& size ) { mIndicator.SetSize(size.width, mIndicatorFixedHeight); } + + Control::OnSizeSet( size ); } void ScrollBar::SetScrollDirection( Toolkit::ScrollBar::Direction direction )