Add kineticScrollingDeceleration setting
This commit is contained in:
parent
8b11ddd5b5
commit
efda3a419e
|
@ -267,6 +267,7 @@ class UISettings(JSONDataFile):
|
|||
"hideMembershipEvents": False,
|
||||
"hideUnknownEvents": True,
|
||||
"kineticScrollingMaxSpeed": 2500,
|
||||
"kineticScrollingDeceleration": 1500,
|
||||
"markRoomReadMsecDelay": 200,
|
||||
"maxMessageCharactersPerLine": 65,
|
||||
"ownMessagesOnLeftAboveWidth": 895,
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user