2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2021 The Qt Company Ltd.
|
2023-01-04 08:52:22 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2013-09-16 16:55:07 +02:00
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
import QtQuick 2.15
|
|
|
|
|
import QtQuick.Layouts 1.15
|
2013-09-16 16:55:07 +02:00
|
|
|
import HelperWidgets 2.0
|
2021-06-21 16:48:19 +02:00
|
|
|
import StudioTheme 1.0 as StudioTheme
|
2013-09-16 16:55:07 +02:00
|
|
|
|
|
|
|
|
Column {
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
|
|
|
|
|
|
|
|
|
Section {
|
|
|
|
|
anchors.left: parent.left
|
|
|
|
|
anchors.right: parent.right
|
2021-06-21 16:48:19 +02:00
|
|
|
caption: qsTr("Rectangle")
|
2013-09-16 16:55:07 +02:00
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
SectionLayout {
|
2023-02-02 17:49:09 +01:00
|
|
|
PropertyLabel {
|
|
|
|
|
text: qsTr("Fill color")
|
|
|
|
|
tooltip: qsTr("Sets the color for the background.")
|
|
|
|
|
}
|
2013-09-20 17:52:43 +02:00
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
ColorEditor {
|
|
|
|
|
backendValue: backendValues.color
|
|
|
|
|
supportGradient: backendValues.gradient.isAvailable
|
|
|
|
|
}
|
2013-09-16 16:55:07 +02:00
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
PropertyLabel {
|
|
|
|
|
text: qsTr("Border color")
|
2023-02-02 17:49:09 +01:00
|
|
|
tooltip: qsTr("Sets the color for the border.")
|
2021-06-21 16:48:19 +02:00
|
|
|
visible: backendValues.border_color.isAvailable
|
|
|
|
|
}
|
2013-09-20 17:52:43 +02:00
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
ColorEditor {
|
|
|
|
|
visible: backendValues.border_color.isAvailable
|
|
|
|
|
backendValue: backendValues.border_color
|
|
|
|
|
supportGradient: false
|
|
|
|
|
}
|
2013-09-16 16:55:07 +02:00
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
PropertyLabel {
|
2021-06-24 18:01:03 +02:00
|
|
|
text: qsTr("Border width")
|
2023-02-02 17:49:09 +01:00
|
|
|
tooltip: qsTr("Sets the border width.")
|
2021-07-13 18:36:25 +02:00
|
|
|
blockedByTemplate: !backendValues.border_width.isAvailable
|
2013-09-16 16:55:07 +02:00
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
2013-09-16 16:55:07 +02:00
|
|
|
SecondColumnLayout {
|
|
|
|
|
SpinBox {
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
|
|
|
|
width: implicitWidth
|
2013-09-16 16:55:07 +02:00
|
|
|
backendValue: backendValues.border_width
|
2020-09-18 16:15:09 +02:00
|
|
|
enabled: backendValue.isAvailable
|
2013-09-16 16:55:07 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
ExpandingSpacer {}
|
2013-09-16 16:55:07 +02:00
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
2023-02-02 17:49:09 +01:00
|
|
|
PropertyLabel {
|
|
|
|
|
text: qsTr("Radius")
|
|
|
|
|
tooltip: qsTr("Sets the radius by which the corners get rounded.")
|
|
|
|
|
}
|
2021-06-21 16:48:19 +02:00
|
|
|
|
2013-09-16 16:55:07 +02:00
|
|
|
SecondColumnLayout {
|
|
|
|
|
SpinBox {
|
2021-06-21 16:48:19 +02:00
|
|
|
implicitWidth: StudioTheme.Values.twoControlColumnWidth
|
|
|
|
|
+ StudioTheme.Values.actionIndicatorWidth
|
|
|
|
|
width: implicitWidth
|
2013-09-16 16:55:07 +02:00
|
|
|
backendValue: backendValues.radius
|
2014-07-30 10:51:53 +02:00
|
|
|
minimumValue: 0
|
|
|
|
|
maximumValue: Math.min(backendValues.height.value, backendValues.width.value) / 2
|
2013-09-16 16:55:07 +02:00
|
|
|
}
|
|
|
|
|
|
2021-06-21 16:48:19 +02:00
|
|
|
ExpandingSpacer {}
|
2013-09-16 16:55:07 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|