From 62ddf21fb6932e12d4255f65e4c4deb1c703dc5c Mon Sep 17 00:00:00 2001 From: Martin Klapetek Date: Sat, 16 Jun 2012 14:55:40 +0200 Subject: [PATCH] Don't allow overscrolling views by clicking scrollbar arrows REVIEW: 105268 --- declarativeimports/plasmacomponents/qml/ScrollBar.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/declarativeimports/plasmacomponents/qml/ScrollBar.qml b/declarativeimports/plasmacomponents/qml/ScrollBar.qml index 719b83f49..c5dbce337 100644 --- a/declarativeimports/plasmacomponents/qml/ScrollBar.qml +++ b/declarativeimports/plasmacomponents/qml/ScrollBar.qml @@ -132,10 +132,10 @@ Item { return; if (internalLoader.isVertical) { - flickableItem.contentY = Math.max(0, Math.min(flickableItem.contentHeight, + flickableItem.contentY = Math.max(0, Math.min(flickableItem.contentHeight - flickableItem.height, flickableItem.contentY + increment)) } else { - flickableItem.contentX = Math.max(0, Math.min(flickableItem.contentWidth, + flickableItem.contentX = Math.max(0, Math.min(flickableItem.contentWidth - flickableItem.width, flickableItem.contentX + increment)) } }