diff options
author | Richard Dale <richard.dale@codethink.co.uk> | 2013-07-04 09:56:52 +0100 |
---|---|---|
committer | Richard Dale <richard.dale@codethink.co.uk> | 2013-07-04 09:56:52 +0100 |
commit | acf9e50d52c4d09a1aed9490bb2f3c5de7dce9bb (patch) | |
tree | 5b05df5a9e67f397bc7629f0921bc30c64bcc03e /src/private/ScrollViewHelper.qml | |
parent | a7e874ddf3496766903fc88e52fb61573c3d3f74 (diff) | |
parent | aa4ddfd8443f07badc0899d835027e46c6e0dfd8 (diff) | |
download | qtquickcontrols-baserock/morph.tar.gz |
Merge v5.1.0 releasebaserock/morph
Diffstat (limited to 'src/private/ScrollViewHelper.qml')
-rw-r--r-- | src/private/ScrollViewHelper.qml | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/private/ScrollViewHelper.qml b/src/private/ScrollViewHelper.qml index cf5c514f..9e8e78d6 100644 --- a/src/private/ScrollViewHelper.qml +++ b/src/private/ScrollViewHelper.qml @@ -57,6 +57,8 @@ Item { property int availableWidth property int contentHeight property int contentWidth + property real originX + property real originY property int leftMargin: outerFrame ? root.__style.padding.left : 0 property int rightMargin: outerFrame ? root.__style.padding.right : 0 @@ -74,6 +76,8 @@ Item { wheelarea.availableHeight = viewport.height wheelarea.contentWidth = flickableItem !== null ? flickableItem.contentWidth : 0 wheelarea.contentHeight = flickableItem !== null ? flickableItem.contentHeight : 0 + wheelarea.originX = flickableItem !== null ? flickableItem.originX : 0 + wheelarea.originY = flickableItem !== null ? flickableItem.originY : 0 recursionGuard = false } } @@ -123,8 +127,8 @@ Item { visible: contentWidth > availableWidth height: visible ? implicitHeight : 0 z: 1 - maximumValue: contentWidth > availableWidth ? contentWidth - availableWidth : 0 - minimumValue: 0 + maximumValue: contentWidth > availableWidth ? originX + contentWidth - availableWidth : 0 + minimumValue: originX anchors.bottom: parent.bottom anchors.left: parent.left anchors.right: cornerFill.left @@ -158,8 +162,8 @@ Item { width: visible ? implicitWidth : 0 z: 1 anchors.bottom: cornerFill.top - maximumValue: contentHeight > availableHeight ? contentHeight - availableHeight + __viewTopMargin : 0 - minimumValue: 0 + maximumValue: contentHeight > availableHeight ? originY + contentHeight - availableHeight + __viewTopMargin : 0 + minimumValue: originY anchors.right: parent.right anchors.top: parent.top anchors.topMargin: __scrollBarTopMargin + topMargin |