From ea96b511924399c6fd4e5bcb6a1f14f89c117a4a Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Tue, 13 Oct 2020 16:31:15 +0200 Subject: 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 --- src/imports/controls/macos/ScrollView.qml | 5 ----- 1 file changed, 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 -- cgit v1.2.3