From d7ada4a512827c865c1336a4b9ddcf80b38fa24e Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Wed, 14 Oct 2020 09:50:50 +0200 Subject: nativestyle/ScrollBar: don't show the scrollbar if the policy is AlwaysOff As it stood, we would always show the scrollbar if its size was less than 1.0. This is wrong, we should only do that if the policy is also "AsNeeded". Change-Id: I516219dc27e0c3ef80e0e7bc2e11b36a8836e22d Reviewed-by: Mitch Curtis --- src/imports/nativestyle/controls/DefaultScrollBar.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imports/nativestyle/controls/DefaultScrollBar.qml b/src/imports/nativestyle/controls/DefaultScrollBar.qml index 4ba4f80c..b7b78732 100644 --- a/src/imports/nativestyle/controls/DefaultScrollBar.qml +++ b/src/imports/nativestyle/controls/DefaultScrollBar.qml @@ -51,7 +51,7 @@ T.ScrollBar { font.pixelSize: __nativeContentItem ? contentItem.styleFont(control).pixelSize : undefined - visible: policy === T.ScrollBar.AlwaysOn || size < 1.0 + visible: policy === T.ScrollBar.AlwaysOn || (policy === T.ScrollBar.AsNeeded && size < 1.0) minimumSize: !__nativeContentItem ? 10 : orientation === Qt.Vertical ? contentItem.minimumSize.height / height : contentItem.minimumSize.width / width -- cgit v1.2.3