summaryrefslogtreecommitdiff
path: root/src/controls/Styles/Base/ScrollViewStyle.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/controls/Styles/Base/ScrollViewStyle.qml')
-rw-r--r--src/controls/Styles/Base/ScrollViewStyle.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/controls/Styles/Base/ScrollViewStyle.qml b/src/controls/Styles/Base/ScrollViewStyle.qml
index 1a626423..09bc7da3 100644
--- a/src/controls/Styles/Base/ScrollViewStyle.qml
+++ b/src/controls/Styles/Base/ScrollViewStyle.qml
@@ -378,8 +378,8 @@ Style {
width: __styleData.horizontal ? extent : implicitWidth
anchors.top: bg.top
anchors.left: bg.left
- anchors.topMargin: __styleData.horizontal ? 0 : -handleOverlap + (2 * begin * (bg.height + (2 * handleOverlap) - extent) + range) / (2 * range)
- anchors.leftMargin: __styleData.horizontal ? -handleOverlap + (2 * begin * (bg.width + (2 * handleOverlap) - extent) + range) / (2 * range) : 0
+ anchors.topMargin: __styleData.horizontal || range === 0 ? 0 : -handleOverlap + (2 * begin * (bg.height + (2 * handleOverlap) - extent) + range) / (2 * range)
+ anchors.leftMargin: __styleData.horizontal && range !== 0 ? -handleOverlap + (2 * begin * (bg.width + (2 * handleOverlap) - extent) + range) / (2 * range) : 0
sourceComponent: handle
property QtObject styleData: QtObject {
readonly property bool hovered: activeControl === "handle"