Skip to content

Commit 9e249e2

Browse files
committed
Merge #243: Disable prune target setting when prune is disabled, introduce Disabled Setting color animation state
ac37e32 qml: disable prune target setting when prune is disabled (jarolrod) f26fd25 qml: Add Disabled states in Setting and ValueInput (jarolrod) Pull request description: This disables the prune target ValueInput setting when the prune enabled/disabled Switch Setting is disabled. Also introduces the "DISABLED" state in accordance with the design file. light | enabled | disabled | | ------- | -------- | | <img width="468" alt="Screen Shot 2023-02-01 at 4 44 37 AM" src="https://user-images.githubusercontent.com/23396902/216008005-f72e92a4-3411-4bbc-88b2-03c0c91e7684.png"> | <img width="468" alt="Screen Shot 2023-02-01 at 4 44 42 AM" src="https://user-images.githubusercontent.com/23396902/216008040-085debd3-c1cb-4df9-8498-35d21959d811.png"> | dark | enabled | disabled | | ------- | -------- | | <img width="468" alt="Screen Shot 2023-02-01 at 4 44 03 AM" src="https://user-images.githubusercontent.com/23396902/216008151-897f672b-0768-419d-87a3-77174b747c5e.png"> | <img width="468" alt="Screen Shot 2023-02-01 at 4 44 14 AM" src="https://user-images.githubusercontent.com/23396902/216008191-031e93fc-6fba-48e0-b9bd-cfbd4c102a0d.png"> | [![Windows](https://img.shields.io/badge/OS-Windows-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/insecure_win_gui.zip?branch=pull/<PR>) [![Intel macOS](https://img.shields.io/badge/OS-Intel%20macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/insecure_mac_gui.zip?branch=pull/<PR>) [![Apple Silicon macOS](https://img.shields.io/badge/OS-Apple%20Silicon%20macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos_arm64/insecure_mac_arm64_gui.zip?branch=pull/<PR>) [![ARM64 Android](https://img.shields.io/badge/OS-Android-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/insecure_android_apk.zip?branch=pull/<PR>) ACKs for top commit: johnny9: ACK ac37e32 Tree-SHA512: b36e1773e482fb40dbaaf8e938460001f30a0ac78a5917fd5851a88393b137d519fa24399ff9a01d4e1914eb5ecfee71a755f94d5746017030ee46d4b732da4a
2 parents 0229f6e + ac37e32 commit 9e249e2

File tree

3 files changed

+33
-2
lines changed

3 files changed

+33
-2
lines changed

src/qml/components/StorageSettings.qml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ ColumnLayout {
1515
actionItem: OptionSwitch {
1616
checked: optionsModel.prune
1717
onToggled: optionsModel.prune = checked
18+
onCheckedChanged: {
19+
if (checked == false) {
20+
pruneTargetSetting.state = "DISABLED"
21+
} else {
22+
pruneTargetSetting.state = "FILLED"
23+
}
24+
}
1825
}
1926
onClicked: {
2027
loadedItem.toggle()

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)