QmlDesigner: Add independent corner radii section

* Add independent corner radii section to RectangleSpecifics
* Remove limit on radius control
* Set decimals on the independent corner radii controls to 0
* Move CornerRadiusSection component to HelperWidgets

Task-number: QDS-15161
Change-Id: Iac4f644ebdb6a530e05605997d8d4cb24a1471f5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Henning Gruendl
2025-04-08 15:30:41 +02:00
committed by Henning Gründl
parent feab217705
commit b4cbea34a7
3 changed files with 21 additions and 10 deletions

View File

@@ -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
}
}

View File

@@ -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

View File

@@ -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