diff options
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2020-10-13 16:31:15 +0200
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2020-10-14 13:38:19 +0200
commitea96b511924399c6fd4e5bcb6a1f14f89c117a4a (patch)
parent819f290e17080f51f2e780c9e4b4532d67094d81 (diff)
macOS/ScrollView: don't create contentItem too early
When creating the binding "contentItem.clip:" we accidentally also created the contentItem before the component was completed. Since the contentItem of a ScrollView is a Flickable, it meant that we ended up always creating an internal flickable from QQuickScrollViewPrivate::ensureFlickable, instead of using the Flickable child if there was one. So this binding cannot be used. Change-Id: I2e7ca63f64693adb1b524966fec82aef2b3fb658 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
1 files changed, 0 insertions, 5 deletions
diff --git a/src/imports/controls/macos/ScrollView.qml b/src/imports/controls/macos/ScrollView.qml
index 8b38f710..9b695161 100644
--- a/src/imports/controls/macos/ScrollView.qml
+++ b/src/imports/controls/macos/ScrollView.qml
@@ -47,11 +47,6 @@ T.ScrollView {
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
contentHeight + topPadding + bottomPadding)
- // If ScrollView has clip set, we need to clip the contentItem as well.
- // This because the scrollbars are semi-transparent and non-transient
- // (doesn't float on top), and in that case, the contents will show through them.
- contentItem.clip: clip && (ScrollBar.vertical.visible || ScrollBar.horizontal.visible)
rightPadding: ScrollBar.vertical.visible ? ScrollBar.vertical.width : 0
bottomPadding: ScrollBar.horizontal.visible ? ScrollBar.horizontal.height : 0