Raise max flicking speed while keyboard-scrolling
Lets holding the page down/up keybinds properly do their job again
This commit is contained in:
parent
c1f9416f1a
commit
ad8c9d55dc
1
TODO.md
1
TODO.md
@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
- Avatar tooltip can get displayed in front of presence menu
|
- Avatar tooltip can get displayed in front of presence menu
|
||||||
- Use loading cursorShape
|
- Use loading cursorShape
|
||||||
- Increase keyboard page scroll speed
|
|
||||||
|
|
||||||
- global presence control
|
- global presence control
|
||||||
|
|
||||||
|
@ -432,11 +432,14 @@ QtObject {
|
|||||||
(futureVelocity < 0 && currentVelocity < futureVelocity / 2) ||
|
(futureVelocity < 0 && currentVelocity < futureVelocity / 2) ||
|
||||||
(futureVelocity > 0 && currentVelocity > futureVelocity / 2)
|
(futureVelocity > 0 && currentVelocity > futureVelocity / 2)
|
||||||
|
|
||||||
const magicNumber = 2.5
|
const magicNumber = 2.5
|
||||||
const normalDecel = flickable.flickDeceleration
|
const normalDecel = flickable.flickDeceleration
|
||||||
const fastMultiply =
|
const normalMaxSpeed = flickable.maximumFlickVelocity
|
||||||
|
const fastMultiply =
|
||||||
pages && multiplier / (1 - Math.log10(Math.abs(pages)))
|
pages && multiplier / (1 - Math.log10(Math.abs(pages)))
|
||||||
|
|
||||||
|
flickable.maximumFlickVelocity = 5000
|
||||||
|
|
||||||
flickable.flickDeceleration = Math.max(
|
flickable.flickDeceleration = Math.max(
|
||||||
goFaster ? normalDecel : -Infinity,
|
goFaster ? normalDecel : -Infinity,
|
||||||
Math.abs(normalDecel * magicNumber * pages),
|
Math.abs(normalDecel * magicNumber * pages),
|
||||||
@ -447,7 +450,8 @@ QtObject {
|
|||||||
|
|
||||||
horizontal ? flickable.flick(flick, 0) : flickable.flick(0, flick)
|
horizontal ? flickable.flick(flick, 0) : flickable.flick(0, flick)
|
||||||
|
|
||||||
flickable.flickDeceleration = normalDecel
|
flickable.maximumFlickVelocity = normalMaxSpeed
|
||||||
|
flickable.flickDeceleration = normalDecel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user