diff options
author | Oliver Eftevaag <oliver.eftevaag@qt.io> | 2023-02-23 18:31:00 +0100 |
---|---|---|
committer | Oliver Eftevaag <oliver.eftevaag@qt.io> | 2023-02-24 12:39:55 +0100 |
commit | 32e1287f3f432e29e9fddd262788ff49479bbaec (patch) | |
tree | a9dd7a60e29ea3733a5efb12a549ff12ca21f9e2 /examples/quick | |
parent | 80ad280d2cff24fb01af434ff82d8e64f7d48c3e (diff) |
PointerHanders FakeFlickable: Fix ambiguous references
The max property is declared inside the "knob" rectangle.
The id of the rectangle should be used, in order to reference it
correctly.
Pick-to: 6.5
Change-Id: I157ab9c3ba687f6e0998f907f064014d03c5902f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'examples/quick')
-rw-r--r-- | examples/quick/pointerhandlers/components/ScrollBar.qml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/quick/pointerhandlers/components/ScrollBar.qml b/examples/quick/pointerhandlers/components/ScrollBar.qml index d78ee56140..6b13c03305 100644 --- a/examples/quick/pointerhandlers/components/ScrollBar.qml +++ b/examples/quick/pointerhandlers/components/ScrollBar.qml @@ -70,7 +70,7 @@ Rectangle { PropertyChanges { knob { max: root.width - knob.width - scrolledX: Math.min(max, Math.max(0, max * flick.contentX / (flick.width - flick.contentWidth))) + scrolledX: Math.min(knob.max, Math.max(0, knob.max * flick.contentX / (flick.width - flick.contentWidth))) scrolledY: 1 scrollDistance: flick.width - flick.contentWidth width: flick.width * (flick.width / flick.contentWidth) - (height - anchors.margins) * 2 @@ -91,7 +91,7 @@ Rectangle { knob { max: root.height - knob.height scrolledX: 1 - scrolledY: Math.min(max, Math.max(0, max * flick.contentY / (flick.height - flick.contentHeight))) + scrolledY: Math.min(knob.max, Math.max(0, knob.max * flick.contentY / (flick.height - flick.contentHeight))) scrollDistance: flick.height - flick.contentHeight width: root.width - 2 height: root.width - 2 |