diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/HorizontalScrollBar.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/HorizontalScrollBar.qml index 3ae138d600b..9041dc17f0d 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/HorizontalScrollBar.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/HorizontalScrollBar.qml @@ -1,9 +1,9 @@ // Copyright (C) 2020 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 -import QtQuick 2.15 -import QtQuick.Controls.Basic 2.15 -import StudioTheme 1.0 as StudioTheme +import QtQuick +import QtQuick.Controls.Basic +import StudioTheme as StudioTheme ScrollBar { id: scrollBar @@ -13,9 +13,10 @@ ScrollBar { implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset, implicitContentHeight + topPadding + bottomPadding) - property bool scrollBarVisible: parent.childrenRect.width > parent.width + minimumSize: orientation == Qt.Horizontal ? height / width : width / height + orientation: Qt.Horizontal policy: scrollBar.scrollBarVisible ? ScrollBar.AlwaysOn : ScrollBar.AlwaysOff x: 0 @@ -24,8 +25,6 @@ ScrollBar { - (parent.bothVisible ? parent.verticalThickness : 0) padding: 0 - minimumSize: orientation == Qt.Horizontal ? height / width : width / height - background: Rectangle { color: StudioTheme.Values.themeScrollBarTrack } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/VerticalScrollBar.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/VerticalScrollBar.qml index 8cf54df8e54..520f401116f 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/VerticalScrollBar.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/VerticalScrollBar.qml @@ -1,9 +1,9 @@ // Copyright (C) 2020 The Qt Company Ltd. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 -import QtQuick 2.15 -import QtQuick.Controls.Basic 2.15 -import StudioTheme 1.0 as StudioTheme +import QtQuick +import QtQuick.Controls.Basic +import StudioTheme as StudioTheme ScrollBar { id: scrollBar