diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/RectangleSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/RectangleSpecifics.qml index cdcea69e066..f5d0b6ec017 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/RectangleSpecifics.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/RectangleSpecifics.qml @@ -1,10 +1,10 @@ // Copyright (C) 2021 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.Layouts 1.15 -import HelperWidgets 2.0 -import StudioTheme 1.0 as StudioTheme +import QtQuick +import QtQuick.Layouts +import HelperWidgets +import StudioTheme as StudioTheme Column { anchors.left: parent.left @@ -68,11 +68,21 @@ Column { width: implicitWidth backendValue: backendValues.radius minimumValue: 0 - maximumValue: Math.min(backendValues.height.value, backendValues.width.value) / 2 + maximumValue: 0xffff } ExpandingSpacer {} } } } + + CornerRadiusSection { + id: cornerRadiusSection + property bool radiiAvailable: backendValues.topLeftRadius.isAvailable + // && backendValues.topRightRadius.isAvailable + // && backendValues.bottomLeftRadius.isAvailable + // && backendValues.bottomRightRadius.isAvailable + + visible: majorQtQuickVersion >= 6 && minorQtQuickVersion >= 7 && cornerRadiusSection.radiiAvailable + } } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Studio/Components/CornerRadiusSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/CornerRadiusSection.qml similarity index 96% rename from share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Studio/Components/CornerRadiusSection.qml rename to share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/CornerRadiusSection.qml index b51c7b2dcdf..824881ce2b6 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick/Studio/Components/CornerRadiusSection.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/CornerRadiusSection.qml @@ -21,7 +21,7 @@ Section { implicitWidth: StudioTheme.Values.twoControlColumnWidth + StudioTheme.Values.actionIndicatorWidth backendValue: backendValues.topLeftRadius - decimals: 1 + decimals: 0 minimumValue: 0 maximumValue: 0xffff stepSize: 1 @@ -40,7 +40,7 @@ Section { implicitWidth: StudioTheme.Values.twoControlColumnWidth + StudioTheme.Values.actionIndicatorWidth backendValue: backendValues.topRightRadius - decimals: 1 + decimals: 0 minimumValue: 0 maximumValue: 0xffff stepSize: 1 @@ -67,7 +67,7 @@ Section { implicitWidth: StudioTheme.Values.twoControlColumnWidth + StudioTheme.Values.actionIndicatorWidth backendValue: backendValues.bottomLeftRadius - decimals: 1 + decimals: 0 minimumValue: 0 maximumValue: 0xffff stepSize: 1 @@ -87,7 +87,7 @@ Section { implicitWidth: StudioTheme.Values.twoControlColumnWidth + StudioTheme.Values.actionIndicatorWidth backendValue: backendValues.bottomRightRadius - decimals: 1 + decimals: 0 minimumValue: 0 maximumValue: 0xffff stepSize: 1 @@ -114,7 +114,7 @@ Section { implicitWidth: StudioTheme.Values.twoControlColumnWidth + StudioTheme.Values.actionIndicatorWidth backendValue: backendValues.radius - decimals: 1 + decimals: 0 minimumValue: 0 maximumValue: 0xffff stepSize: 1 diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/qmldir b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/qmldir index 29675dfde5b..3b0c5424448 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/qmldir +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/qmldir @@ -18,6 +18,7 @@ ComponentButton 2.0 ComponentButton.qml ComponentSection 2.0 ComponentSection.qml ControlLabel 2.0 ControlLabel.qml singleton Controller 2.0 Controller.qml +CornerRadiusSection 2.0 CornerRadiusSection.qml DoubleSpinBox 2.0 DoubleSpinBox.qml DynamicPropertiesSection 2.0 DynamicPropertiesSection.qml EditableListView 2.0 EditableListView.qml