From 892f60a6f8bf5e9f8f0eb6c9539efcd53d77d2c2 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 9 May 2018 14:31:58 +0200 Subject: [PATCH 1/6] constrain scroll BUG:393992 --- org.kde.desktop/ScrollBar.qml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/org.kde.desktop/ScrollBar.qml b/org.kde.desktop/ScrollBar.qml index 5d15e26..1051dde 100644 --- a/org.kde.desktop/ScrollBar.qml +++ b/org.kde.desktop/ScrollBar.qml @@ -34,6 +34,7 @@ T.ScrollBar { hoverEnabled: true visible: controlRoot.size < 1.0 + stepSize: 0.02 background: MouseArea { id: mouseArea @@ -45,11 +46,11 @@ T.ScrollBar { onExited: style.activeControl = "groove"; onPressed: { if (style.activeControl == "down") { - buttonTimer.increment = 0.02; + buttonTimer.increment = 1; buttonTimer.running = true; mouse.accepted = true } else if (style.activeControl == "up") { - buttonTimer.increment = -0.02; + buttonTimer.increment = -1; buttonTimer.running = true; mouse.accepted = true } else { @@ -88,7 +89,11 @@ T.ScrollBar { repeat: true interval: 150 onTriggered: { - controlRoot.position += increment; + if (increment > 0) { + controlRoot.increase(); + } else { + controlRoot.decrease(); + } } } } -- 2.14.3