aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2020-10-14 09:50:50 +0200
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2020-10-14 13:38:41 +0200
commitd7ada4a512827c865c1336a4b9ddcf80b38fa24e (patch)
tree29699f1bd6526db9bd70509a6b72a54eb1163b95
parent0a48787cef9c37a4607f2158abebaa23cbf9ea59 (diff)
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 <mitch.curtis@qt.io>
-rw-r--r--src/imports/nativestyle/controls/DefaultScrollBar.qml2
1 files changed, 1 insertions, 1 deletions
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