Fix clicking on eventList top/bot making it scroll
This commit is contained in:
parent
6a346264be
commit
24a976e3ee
|
@ -54,11 +54,11 @@ FocusScope {
|
|||
}
|
||||
|
||||
|
||||
Item { id: dragPoint }
|
||||
Item { id: dragCursor }
|
||||
|
||||
DragHandler {
|
||||
id: dragHandler
|
||||
target: dragPoint
|
||||
target: dragCursor
|
||||
onActiveChanged: {
|
||||
if (active) {
|
||||
target.Drag.active = true
|
||||
|
|
|
@ -44,6 +44,7 @@ Column {
|
|||
combine ? theme.spacing / 2 :
|
||||
theme.spacing * 2
|
||||
|
||||
|
||||
Daybreak {
|
||||
visible: dayBreak
|
||||
width: eventDelegate.width
|
||||
|
|
|
@ -13,6 +13,8 @@ Rectangle {
|
|||
reversed: eventList.verticalLayoutDirection == ListView.BottomToTop
|
||||
|
||||
onDragPositionChanged: {
|
||||
let vel = dragPoint.velocity.y
|
||||
|
||||
let boost = 20 * (
|
||||
dragPosition.y < 50 ?
|
||||
-dragPosition.y : -(height - dragPosition.y)
|
||||
|
@ -20,8 +22,8 @@ Rectangle {
|
|||
|
||||
dragFlicker.speed =
|
||||
dragPosition.x == 0 && dragPosition.y == 0 ? 0 :
|
||||
dragPosition.y < 50 ? 1000 + boost:
|
||||
dragPosition.y > height - 50 ? -1000 + -boost :
|
||||
vel && dragPosition.y < 50 ? 1000 + boost:
|
||||
vel && dragPosition.y > height - 50 ? -1000 + -boost :
|
||||
0
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user