diff options
author | Aleix Pol <aleixpol@kde.org> | 2015-03-30 18:47:52 +0200 |
---|---|---|
committer | Albert Astals Cid <albert.astals@canonical.com> | 2015-05-22 16:40:59 +0000 |
commit | c5c7c2091385e4f6177516e464dcf617d863f2d0 (patch) | |
tree | 74781c7e0f3c1523e7778f6fce48f339b9ad3664 /src/controls/ScrollView.qml | |
parent | 58b8833045f7dc2f5c8c433f9cbbc38e777642ae (diff) | |
download | qtquickcontrols-c5c7c2091385e4f6177516e464dcf617d863f2d0.tar.gz |
Take QApplication::wheelScrollLines into account from ScrollView
Take the property into account, like QtWidgets applications do. This way
the scroll feels more similar to the rest of applications.
Change-Id: Ifde385fbfb052e5d6a446b1e339ce86ae8eca609
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/controls/ScrollView.qml')
-rw-r--r-- | src/controls/ScrollView.qml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/controls/ScrollView.qml b/src/controls/ScrollView.qml index 856a32ef..5c21848f 100644 --- a/src/controls/ScrollView.qml +++ b/src/controls/ScrollView.qml @@ -279,6 +279,12 @@ FocusScope { verticalMinimumValue: flickableItem ? flickableItem.originY : 0 verticalMaximumValue: flickableItem ? flickableItem.originY + flickableItem.contentHeight - viewport.height + __viewTopMargin : 0 + // The default scroll speed for typical angle-based mouse wheels. The value + // comes originally from QTextEdit, which sets 20px steps by default, as well as + // QQuickWheelArea. + // TODO: centralize somewhere, QPlatformTheme? + scrollSpeed: 20 * (__style.__wheelScrollLines || 1) + Connections { target: flickableItem |