QmlDesigner: Disable scrolling if content does fit

This is required on windows, because the other scrollbar seems
to be taken into account somehow.

Change-Id: I890faf7493c38df1f2f2f7fae011d4946f1b9c33
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
This commit is contained in:
Thomas Hartmann
2022-09-20 11:35:52 +02:00
parent 21b9e6ac7f
commit 7fc3bac762

View File

@@ -520,6 +520,16 @@ Rectangle {
orientation: Qt.Vertical orientation: Qt.Vertical
} }
flickableDirection: {
if (frame.contentHeight <= scrollView.height)
return Flickable.HorizontalFlick
if (frame.contentWidth <= scrollView.width)
return Flickable.VerticalFlick
return Flickable.HorizontalAndVerticalFlick
}
Flickable { Flickable {
id: frame id: frame
boundsMovement: Flickable.StopAtBounds boundsMovement: Flickable.StopAtBounds