From d3a626fbc543c6edb68b5fa206a26840c103f7c0 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Fri, 2 Oct 2020 10:39:21 +0200 Subject: Native style: ensure ScrollView contents doesn't go under the scrollbars On macOS the scrollbars are not transient. The contentItem of a ScrollView should therefore be aligned to the side of the scrollbars, rather than to the side of the ScrollView. Change-Id: Ie58753d61c04c979270995deb6e3b2650fa643db Reviewed-by: Mitch Curtis --- tests/manual/nativestyle/ControlContainer.qml | 2 +- tests/manual/nativestyle/TextAreas.qml | 2 -- tests/manual/nativestyle/main.qml | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/manual/nativestyle/ControlContainer.qml b/tests/manual/nativestyle/ControlContainer.qml index f528e994..5ac9f6bb 100644 --- a/tests/manual/nativestyle/ControlContainer.qml +++ b/tests/manual/nativestyle/ControlContainer.qml @@ -41,7 +41,7 @@ import QtQuick.Layouts Item { anchors.left: parent.left anchors.right: parent.right - anchors.rightMargin: 20 // make room for scrollbar + anchors.rightMargin: 7 implicitHeight: groupBox.height property alias title: groupBox.title diff --git a/tests/manual/nativestyle/TextAreas.qml b/tests/manual/nativestyle/TextAreas.qml index f411c3bd..e3911992 100644 --- a/tests/manual/nativestyle/TextAreas.qml +++ b/tests/manual/nativestyle/TextAreas.qml @@ -78,7 +78,6 @@ ControlContainer { + "mollit anim id est laborum." wrapMode: TextEdit.WordWrap selectByMouse: true - rightPadding: scrollView.ScrollBar.vertical.width } } } @@ -115,7 +114,6 @@ ControlContainer { + "mollit anim id est laborum." wrapMode: TextEdit.WordWrap selectByMouse: true - rightPadding: scrollView2.ScrollBar.vertical.width } } } diff --git a/tests/manual/nativestyle/main.qml b/tests/manual/nativestyle/main.qml index ef7c89a2..5e75e7a3 100644 --- a/tests/manual/nativestyle/main.qml +++ b/tests/manual/nativestyle/main.qml @@ -70,7 +70,7 @@ ApplicationWindow { anchors.margins: 20 ScrollView { - contentWidth: width + contentWidth: width - ScrollBar.vertical.width clip: true Column { @@ -96,7 +96,7 @@ ApplicationWindow { } ScrollView { - contentWidth: width + contentWidth: width - ScrollBar.vertical.width clip: true Column { -- cgit v1.2.3