X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Fcontrols%2Fscrollable%2Fitem-view%2Fitem-view-impl.cpp;h=939ab67053e95ac4fae7fee294d44d51f5d34de4;hp=cb29404151a2464a51dca15575c6572970f0a951;hb=be93fd772a1b1b09425ac0aaec1ea1b64e9a9e60;hpb=e5d4cd830e75a208dd18c743e1564a4ed1fde780 diff --git a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp old mode 100755 new mode 100644 index cb29404..939ab67 --- a/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp +++ b/dali-toolkit/internal/controls/scrollable/item-view/item-view-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 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. @@ -25,9 +25,9 @@ #include #include -#include +#include #include -#include +#include #include #include #include @@ -1029,7 +1029,7 @@ bool ItemView::OnWheelEvent(const WheelEvent& event) { Actor self = Self(); const Vector3 layoutSize = Self().GetCurrentProperty< Vector3 >( Actor::Property::SIZE ); - float layoutPositionDelta = GetCurrentLayoutPosition(0) - (event.z * mWheelScrollDistanceStep * mActiveLayout->GetScrollSpeedFactor()); + float layoutPositionDelta = GetCurrentLayoutPosition(0) - (event.GetDelta() * mWheelScrollDistanceStep * mActiveLayout->GetScrollSpeedFactor()); float firstItemScrollPosition = ClampFirstItemPosition(layoutPositionDelta, layoutSize, *mActiveLayout); self.SetProperty(Toolkit::ItemView::Property::LAYOUT_POSITION, firstItemScrollPosition ); @@ -1114,7 +1114,7 @@ float ItemView::ClampFirstItemPosition( float targetPosition, const Vector3& tar return clamppedPosition; } -bool ItemView::OnTouch( Actor actor, const TouchData& touch ) +bool ItemView::OnTouch( Actor actor, const TouchEvent& touch ) { // Ignore events with multiple-touch points if (touch.GetPointCount() != 1) @@ -1142,7 +1142,7 @@ bool ItemView::OnTouch( Actor actor, const TouchData& touch ) RemoveAnimation(mScrollAnimation); } - return true; // consume since we're potentially scrolling + return false; // Do not consume as we're potentially scrolling (detecting pan gestures) } void ItemView::OnPan( const PanGesture& gesture )