From e642ba5d356de9cb2f08d20126eb29f02556c339 Mon Sep 17 00:00:00 2001 From: Benjamin Robin Date: Sun, 24 Feb 2019 10:28:14 +0100 Subject: [PATCH] Fix ScrollView scrollbar handles when the content is empty Task-number: QTBUG-73691 --- src/controls/Styles/Base/ScrollViewStyle.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controls/Styles/Base/ScrollViewStyle.qml b/src/controls/Styles/Base/ScrollViewStyle.qml index 6750399d..36b518d3 100644 --- a/src/controls/Styles/Base/ScrollViewStyle.qml +++ b/src/controls/Styles/Base/ScrollViewStyle.qml @@ -370,8 +370,8 @@ Style { property var flickableItem: control.flickableItem property int extent: Math.max(minimumHandleLength, __styleData.horizontal ? - Math.min(1, (flickableItem ? flickableItem.width/flickableItem.contentWidth : 1)) * bg.width : - Math.min(1, (flickableItem ? flickableItem.height/flickableItem.contentHeight : 1)) * bg.height) + Math.min(1, ((flickableItem && flickableItem.contentWidth > 0.0) ? flickableItem.width/flickableItem.contentWidth : 1)) * bg.width : + Math.min(1, ((flickableItem && flickableItem.contentHeight > 0.0) ? flickableItem.height/flickableItem.contentHeight : 1)) * bg.height) readonly property real range: __control.maximumValue - __control.minimumValue readonly property real begin: __control.value - __control.minimumValue -- 2.20.1