Make page scrolling less slippery
This commit is contained in:
parent
14e01159c6
commit
0651fbd100
|
@ -13,7 +13,7 @@ ListView {
|
||||||
preferredHighlightBegin: height / 2 - currentItemHeight
|
preferredHighlightBegin: height / 2 - currentItemHeight
|
||||||
preferredHighlightEnd: height / 2 + currentItemHeight
|
preferredHighlightEnd: height / 2 + currentItemHeight
|
||||||
|
|
||||||
maximumFlickVelocity: 5000
|
maximumFlickVelocity: 4000
|
||||||
|
|
||||||
property bool enableFlicking: true
|
property bool enableFlicking: true
|
||||||
|
|
||||||
|
|
|
@ -41,17 +41,20 @@ HShortcutHandler {
|
||||||
HShortcut {
|
HShortcut {
|
||||||
sequences: settings.keys.scrollPageUp
|
sequences: settings.keys.scrollPageUp
|
||||||
onPressed: Utils.smartVerticalFlick(
|
onPressed: Utils.smartVerticalFlick(
|
||||||
flickTarget, -2.3 * flickTarget.height, 10,
|
flickTarget, -2.3 * flickTarget.height, 8,
|
||||||
)
|
)
|
||||||
onHeld: pressed(event)
|
onHeld: pressed(event)
|
||||||
|
// Ensure only a slight slip after releasing the key
|
||||||
|
onReleased: Utils.smartVerticalFlick(flickTarget, -335)
|
||||||
}
|
}
|
||||||
|
|
||||||
HShortcut {
|
HShortcut {
|
||||||
sequences: settings.keys.scrollPageDown
|
sequences: settings.keys.scrollPageDown
|
||||||
onPressed: Utils.smartVerticalFlick(
|
onPressed: Utils.smartVerticalFlick(
|
||||||
flickTarget, 2.3 * flickTarget.height, 10,
|
flickTarget, 2.3 * flickTarget.height, 8,
|
||||||
)
|
)
|
||||||
onHeld: pressed(event)
|
onHeld: pressed(event)
|
||||||
|
onReleased: Utils.smartVerticalFlick(flickTarget, 335)
|
||||||
}
|
}
|
||||||
|
|
||||||
HShortcut {
|
HShortcut {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user