aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/components/designer/ArcItemSpecifics.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/components/designer/ArcItemSpecifics.qml')
-rw-r--r--src/imports/components/designer/ArcItemSpecifics.qml24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/imports/components/designer/ArcItemSpecifics.qml b/src/imports/components/designer/ArcItemSpecifics.qml
index 28508dd..7f61a1d 100644
--- a/src/imports/components/designer/ArcItemSpecifics.qml
+++ b/src/imports/components/designer/ArcItemSpecifics.qml
@@ -62,6 +62,7 @@ Column {
SecondColumnLayout {
SpinBox {
+ id: strokeWidthSpinBox
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
backendValue: backendValues.strokeWidth
@@ -69,6 +70,16 @@ Column {
minimumValue: -1
maximumValue: 200
stepSize: 1
+
+ property real previousValue: 0
+
+ onValueChanged: {
+ if (strokeWidthSpinBox.value > 0)
+ strokeWidthSpinBox.previousValue = strokeWidthSpinBox.value
+ }
+
+ Component.onCompleted: strokeWidthSpinBox.previousValue
+ = Math.max(1, backendValues.strokeWidth.value)
}
Spacer {
@@ -77,19 +88,14 @@ Column {
}
CheckBox {
- id: strokeWidthCheck
+ id: strokeWidthCheckBox
text: qsTr("Hide")
implicitWidth: StudioTheme.Values.twoControlColumnWidth
- backendValue: backendValues.strokeWidth.value
- checked: (backendValues.strokeWidth.value >= 0 ? false : true)
+ checked: (backendValues.strokeWidth.value < 0)
actionIndicator.visible: false
- onCheckedChanged: {
- if (strokeWidthCheck.checked === true)
- backendValues.strokeWidth.value = -1
- else
- backendValues.strokeWidth.value = ((backendValues.strokeWidth.value < 0) ? 4 : backendValues.strokeWidth.value)
- }
+ onCheckedChanged: backendValues.strokeWidth.value
+ = (strokeWidthCheckBox.checked ? -1 : strokeWidthSpinBox.previousValue)
}
ExpandingSpacer {}