diff options
| -rw-r--r-- | src/controls/ScrollView.qml | 4 | ||||
| -rw-r--r-- | src/controls/TableView.qml | 1 | ||||
| -rw-r--r-- | src/private/ScrollViewHelper.qml | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/controls/ScrollView.qml b/src/controls/ScrollView.qml index 8dc1bd1b8..79ceb5848 100644 --- a/src/controls/ScrollView.qml +++ b/src/controls/ScrollView.qml @@ -135,6 +135,8 @@ FocusScope { /*! \internal */ property int __scrollBarTopMargin: 0 /*! \internal */ + property int __viewTopMargin: 0 + /*! \internal */ property alias __horizontalScrollBar: scroller.horizontalScrollBar /*! \internal */ property alias __verticalScrollBar: scroller.verticalScrollBar @@ -231,7 +233,7 @@ FocusScope { property bool verticalRecursionGuard: false horizontalMaximumValue: flickableItem ? flickableItem.contentWidth - viewport.width : 0 - verticalMaximumValue: flickableItem ? flickableItem.contentHeight - viewport.height : 0 + verticalMaximumValue: flickableItem ? flickableItem.contentHeight - viewport.height + __viewTopMargin : 0 Connections { target: flickableItem diff --git a/src/controls/TableView.qml b/src/controls/TableView.qml index 305690c02..0917158f8 100644 --- a/src/controls/TableView.qml +++ b/src/controls/TableView.qml @@ -240,6 +240,7 @@ ScrollView { frameVisible: true __scrollBarTopMargin: Qt.platform.os === "mac" ? headerrow.height : 0 + __viewTopMargin: headerrow.height /*! \internal */ function __decrementCurrentIndex() { diff --git a/src/private/ScrollViewHelper.qml b/src/private/ScrollViewHelper.qml index 9c39e2b97..c8e1c8360 100644 --- a/src/private/ScrollViewHelper.qml +++ b/src/private/ScrollViewHelper.qml @@ -157,7 +157,7 @@ Item { z: 1 anchors.bottom: cornerFill.top anchors.bottomMargin: hscrollbar.visible ? 0 : frameMargin - maximumValue: contentHeight > availableHeight ? contentHeight - availableHeight : 0 + maximumValue: contentHeight > availableHeight ? contentHeight - availableHeight + __viewTopMargin : 0 minimumValue: 0 anchors.right: parent.right anchors.top: parent.top |
