Add kineticScrollingDeceleration setting
This commit is contained in:
@@ -5,6 +5,7 @@ import QtQuick.Controls 2.12
|
||||
|
||||
Flickable {
|
||||
maximumFlickVelocity: window.settings.kineticScrollingMaxSpeed
|
||||
flickDeceleration: window.settings.kineticScrollingDeceleration
|
||||
|
||||
ScrollBar.vertical: HScrollBar {
|
||||
visible: parent.interactive
|
||||
|
@@ -75,6 +75,7 @@ GridView {
|
||||
preferredHighlightEnd: height / 2 + currentItemHeight / 2
|
||||
|
||||
maximumFlickVelocity: window.settings.kineticScrollingMaxSpeed
|
||||
flickDeceleration: window.settings.kineticScrollingDeceleration
|
||||
|
||||
|
||||
highlight: Rectangle {
|
||||
|
@@ -7,9 +7,6 @@ MouseArea {
|
||||
|
||||
property Flickable flickable: parent
|
||||
|
||||
// Used to get default flickDeceleration value
|
||||
readonly property Flickable dummy: Flickable {}
|
||||
|
||||
function getNewPosition(flickable, wheel) {
|
||||
// wheel.pixelDelta will be available on high resolution trackpads.
|
||||
// Otherwise use wheel.angleDelta, which is available from mouses and
|
||||
@@ -60,6 +57,9 @@ MouseArea {
|
||||
Binding {
|
||||
target: flickable
|
||||
property: "flickDeceleration"
|
||||
value: mouseArea.enabled ? 0 : dummy.flickDeceleration
|
||||
value:
|
||||
mouseArea.enabled ?
|
||||
0 :
|
||||
window.settings.kineticScrollingDeceleration
|
||||
}
|
||||
}
|
||||
|
@@ -87,7 +87,7 @@ ListView {
|
||||
preferredHighlightEnd: height / 2 + currentItemHeight / 2
|
||||
|
||||
maximumFlickVelocity: window.settings.kineticScrollingMaxSpeed
|
||||
|
||||
flickDeceleration: window.settings.kineticScrollingDeceleration
|
||||
|
||||
highlight: Rectangle {
|
||||
color: theme.controls.listView.highlight
|
||||
|
Reference in New Issue
Block a user