X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fscroll-bar%2Fscroll-bar-impl.cpp;h=350ace5f4483f8e93696aef0cdfa167cc97eeb1e;hb=9f3a3fb55f6649f558e72e4b3a3ffdbe3525f617;hp=1ef1e470b3d993d881264a5b45726437ff5a11ef;hpb=1d9a500de9470cbc3130637860bb5909d9d9e311;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git 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 1ef1e47..350ace5 100755 --- a/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp +++ b/dali-toolkit/internal/controls/scroll-bar/scroll-bar-impl.cpp @@ -175,7 +175,7 @@ ScrollBar::~ScrollBar() void ScrollBar::OnInitialize() { CreateDefaultIndicatorActor(); - Self().SetDrawMode(DrawMode::OVERLAY); + Self().SetDrawMode(DrawMode::OVERLAY_2D); } void ScrollBar::SetScrollPropertySource( Handle handle, Property::Index propertyScrollPosition, Property::Index propertyMinScrollPosition, Property::Index propertyMaxScrollPosition, Property::Index propertyScrollContentSize ) @@ -220,14 +220,11 @@ void ScrollBar::SetScrollIndicator( Actor indicator ) mIndicator = indicator; Self().Add(mIndicator); - if( !mPanGestureDetector ) - { - mPanGestureDetector = PanGestureDetector::New(); - mPanGestureDetector.DetectedSignal().Connect(this, &ScrollBar::OnPan); - } + EnableGestureDetection(Gesture::Type(Gesture::Pan)); - 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++ ) @@ -235,7 +232,7 @@ void ScrollBar::SetScrollIndicator( Actor indicator ) Actor child = mIndicator.GetChildAt( index ); if ( child ) { - mPanGestureDetector.Attach( child ); + detector.Attach( child ); } } } @@ -370,7 +367,7 @@ bool ScrollBar::OnPanGestureProcessTick() return true; } -void ScrollBar::OnPan( Actor source, const PanGesture& gesture ) +void ScrollBar::OnPan( const PanGesture& gesture ) { if(mScrollableObject) {