diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-07-12 04:32:52 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-07-12 04:32:52 +0200 |
commit | 64a72a36cf69cce4c962b257ea3eab68d16c64fc (patch) | |
tree | 031a3046d798cf962bcd7e420db4438bdb507724 /framework/qml/ListView.qml | |
parent | c7d0845fb34d7ccea3b754c6bc9cbbc391bfa12d (diff) | |
download | kube-64a72a36cf69cce4c962b257ea3eab68d16c64fc.tar.gz kube-64a72a36cf69cce4c962b257ea3eab68d16c64fc.zip |
Some random other factors for scrolling speed.
This will require some experimentation with various hardware...
Diffstat (limited to 'framework/qml/ListView.qml')
-rw-r--r-- | framework/qml/ListView.qml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/framework/qml/ListView.qml b/framework/qml/ListView.qml index 7fbb5721..f137d03e 100644 --- a/framework/qml/ListView.qml +++ b/framework/qml/ListView.qml | |||
@@ -38,8 +38,12 @@ ListView { | |||
38 | 38 | ||
39 | onWheel: { | 39 | onWheel: { |
40 | //Some trackpads (mine) emit 0 events in between that we can safely ignore. | 40 | //Some trackpads (mine) emit 0 events in between that we can safely ignore. |
41 | if (wheel.angleDelta.y) { | 41 | if (wheel.pixelDelta.y) { |
42 | listView.flick(0, wheel.angleDelta.y * 40) | 42 | //120 is apparently the factor used in windows(https://chromium.googlesource.com/chromium/src/+/70763eb93a32555910a3b4269aeec51252ab9ec6/ui/events/event.cc) |
43 | listView.flick(0, wheel.pixelDelta.y * 120) | ||
44 | } else if (wheel.angleDelta.y) { | ||
45 | //Arbitrary but this seems to work for me... | ||
46 | listView.flick(0, wheel.angleDelta.y * 10) | ||
43 | } | 47 | } |
44 | } | 48 | } |
45 | } | 49 | } |