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=d2b715fa03d773bb94d318bb1051a2289142ab8f;hp=d828897eb55782cd602c28328fc5ec8530e5a040;hb=4f1a814c47a80f11892a6a887cd98099a2eace09;hpb=31df2b9472ccbe0ae460a958535be8ef790c96f2 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 d828897..d2b715f 100755 --- a/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp +++ b/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp @@ -175,6 +175,7 @@ ScrollBar::~ScrollBar() void ScrollBar::OnInitialize() { CreateDefaultIndicatorActor(); + Self().SetDrawMode(DrawMode::OVERLAY_2D); } void ScrollBar::SetScrollPropertySource( Handle handle, Property::Index propertyScrollPosition, Property::Index propertyMinScrollPosition, Property::Index propertyMaxScrollPosition, Property::Index propertyScrollContentSize ) @@ -217,18 +218,13 @@ void ScrollBar::SetScrollIndicator( Actor indicator ) if( indicator ) { mIndicator = indicator; + Self().Add(mIndicator); - Actor self = Self(); - self.Add(mIndicator); + EnableGestureDetection(Gesture::Type(Gesture::Pan)); - if( !mPanGestureDetector ) - { - mPanGestureDetector = PanGestureDetector::New(); - mPanGestureDetector.DetectedSignal().Connect(this, &ScrollBar::OnPan); - } - - mPanGestureDetector.DetachAll(); - mPanGestureDetector.Attach( mIndicator ); + PanGestureDetector detector( GetPanGestureDetector() ); + detector.DetachAll(); + detector.Attach( mIndicator ); unsigned int childCount = mIndicator.GetChildCount(); for ( unsigned int index = 0; index < childCount; index++ ) @@ -236,7 +232,7 @@ void ScrollBar::SetScrollIndicator( Actor indicator ) Actor child = mIndicator.GetChildAt( index ); if ( child ) { - mPanGestureDetector.Attach( child ); + detector.Attach( child ); } } } @@ -371,7 +367,7 @@ bool ScrollBar::OnPanGestureProcessTick() return true; } -void ScrollBar::OnPan( Actor source, const PanGesture& gesture ) +void ScrollBar::OnPan( const PanGesture& gesture ) { if(mScrollableObject) { @@ -438,7 +434,7 @@ void ScrollBar::OnPan( Actor source, const PanGesture& gesture ) if(itemView) { // Disable automatic refresh in ItemView during fast scrolling - GetImpl(itemView).SetRefreshEnabled(true);//!mIsPanning); + GetImpl(itemView).SetRefreshEnabled(!mIsPanning); } } }