summaryrefslogtreecommitdiff
path: root/src/controls/ScrollView.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/controls/ScrollView.qml')
-rw-r--r--src/controls/ScrollView.qml12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/controls/ScrollView.qml b/src/controls/ScrollView.qml
index 183991ac..3a7b031f 100644
--- a/src/controls/ScrollView.qml
+++ b/src/controls/ScrollView.qml
@@ -281,9 +281,21 @@ FocusScope {
horizontalMinimumValue: 0
horizontalMaximumValue: flickableItem ? flickableItem.contentWidth - viewport.width : 0
+ onHorizontalMaximumValueChanged: {
+ wheelArea.horizontalRecursionGuard = true
+ //if horizontalMaximumValue changed, horizontalValue may be actually synced with
+ wheelArea.horizontalValue = flickableItem.contentX - flickableItem.originX;
+ wheelArea.horizontalRecursionGuard = false
+ }
verticalMinimumValue: 0
verticalMaximumValue: flickableItem ? flickableItem.contentHeight - viewport.height + __viewTopMargin : 0
+ onVerticalMaximumValueChanged: {
+ wheelArea.verticalRecursionGuard = true
+ //if verticalMaximumValue changed, verticalValue may be actually synced with
+ wheelArea.verticalValue = flickableItem.contentY - flickableItem.originY;
+ wheelArea.verticalRecursionGuard = false
+ }
// 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