Skip to content

Commit f26fd25

Browse files
committed
qml: Add Disabled states in Setting and ValueInput
1 parent 4ca3b72 commit f26fd25

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

src/qml/controls/Setting.qml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ AbstractButton {
1919
states: [
2020
State {
2121
name: "FILLED"
22-
PropertyChanges { target: root; stateColor: Theme.color.neutral9 }
22+
PropertyChanges {
23+
target: root
24+
enabled: true
25+
stateColor: Theme.color.neutral9
26+
}
2327
},
2428
State {
2529
name: "HOVER"
@@ -28,6 +32,14 @@ AbstractButton {
2832
State {
2933
name: "ACTIVE"
3034
PropertyChanges { target: root; stateColor: Theme.color.orange }
35+
},
36+
State {
37+
name: "DISABLED"
38+
PropertyChanges {
39+
target: root
40+
enabled: false
41+
stateColor: Theme.color.neutral4
42+
}
3143
}
3244
]
3345

src/qml/controls/ValueInput.qml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ TextEdit {
1616
states: [
1717
State {
1818
name: "FILLED"
19-
PropertyChanges { target: root; textColor: Theme.color.neutral9 }
19+
PropertyChanges {
20+
target: root
21+
enabled: true
22+
textColor: Theme.color.neutral9
23+
}
2024
},
2125
State {
2226
name: "HOVER"
@@ -25,6 +29,14 @@ TextEdit {
2529
State {
2630
name: "ACTIVE"
2731
PropertyChanges { target: root; textColor: Theme.color.orange }
32+
},
33+
State {
34+
name: "DISABLED"
35+
PropertyChanges {
36+
target: root
37+
enabled: false
38+
textColor: Theme.color.neutral4
39+
}
2840
}
2941
]
3042

0 commit comments

Comments
 (0)