Prevent non-left buttons from drag-scrolling
This commit is contained in:
parent
24a976e3ee
commit
e6a133598f
|
@ -13,6 +13,7 @@ Rectangle {
|
|||
reversed: eventList.verticalLayoutDirection == ListView.BottomToTop
|
||||
|
||||
onDragPositionChanged: {
|
||||
let left = dragPoint.pressedButtons & Qt.LeftButton
|
||||
let vel = dragPoint.velocity.y
|
||||
|
||||
let boost = 20 * (
|
||||
|
@ -22,8 +23,8 @@ Rectangle {
|
|||
|
||||
dragFlicker.speed =
|
||||
dragPosition.x == 0 && dragPosition.y == 0 ? 0 :
|
||||
vel && dragPosition.y < 50 ? 1000 + boost:
|
||||
vel && dragPosition.y > height - 50 ? -1000 + -boost :
|
||||
left && vel && dragPosition.y < 50 ? 1000 + boost:
|
||||
left && vel && dragPosition.y > height - 50 ? -1000 + -boost :
|
||||
0
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user