Make flickToTop/Bottom faster and more accurate

This commit is contained in:
miruka 2020-11-20 10:23:41 -04:00
parent 42f04b013e
commit 509b35a633

View File

@ -455,9 +455,8 @@ QtObject {
if (! flickable.interactive) return if (! flickable.interactive) return
if (flickable.visibleArea.yPosition < 0) return if (flickable.visibleArea.yPosition < 0) return
flickable.contentY -= flickable.contentHeight flickable.contentY = flickable.originY
flickable.returnToBounds() flickable.flick(0, 1000) // Force the delegates to load and bounce
flickable.flick(0, -100) // Force the delegates to load
} }
@ -465,9 +464,10 @@ QtObject {
if (! flickable.interactive) return if (! flickable.interactive) return
if (flickable.visibleArea.yPosition < 0) return if (flickable.visibleArea.yPosition < 0) return
flickable.contentY = flickable.contentHeight - flickable.height flickable.contentY =
flickable.returnToBounds() flickable.originY + flickable.contentHeight - flickable.height
flickable.flick(0, 100)
flickable.flick(0, -1000)
} }