Skip to content

Commit 655365b

Browse files
committed
Merge #256: ValueInput "EMPTY" state
003f174 qml: add EMPTY state to ValueInput (jarolrod) Pull request description: This adds an `"EMPTY"` state to `ValueInput`, as specified in the [design file](https://www.figma.com/file/ek8w3n3upbluw5UL2lGhRx/Bitcoin-Core-App-Design?node-id=6079%3A166395&t=zvbm4HW9rxQf4iBb-4). This state is only added to `ValueInput` because the `Setting` control should not care about this. All other states continue to function as normal*. ### Light | EMPTY | FILLED | HOVER | ACTIVE | | ----- | ------ | ----- | ------ | | <img width="463" alt="Screen Shot 2023-02-10 at 5 26 04 PM" src="https://user-images.githubusercontent.com/23396902/218226249-e1ce6012-33d5-4362-bd1e-7620bbe9ed85.png"> | <img width="463" alt="Screen Shot 2023-02-10 at 5 24 42 PM" src="https://user-images.githubusercontent.com/23396902/218226265-94b2d5ae-fb7e-41b1-a477-3e9cdc7f9b95.png"> | <img width="463" alt="Screen Shot 2023-02-10 at 5 24 57 PM" src="https://user-images.githubusercontent.com/23396902/218226276-c3fbd0a4-08fc-4302-afe6-c3b187cb4095.png"> | <img width="463" alt="Screen Shot 2023-02-10 at 5 25 18 PM" src="https://user-images.githubusercontent.com/23396902/218226286-4cd43650-9121-4899-9bab-4d844e1efb03.png"> | ### Dark | EMPTY | FILLED | HOVER | ACTIVE | | ----- | ------ | ----- | ------ | | <img width="463" alt="Screen Shot 2023-02-10 at 5 23 43 PM" src="https://user-images.githubusercontent.com/23396902/218226406-9be869ee-0eb1-412c-b5ed-426d35ca9341.png"> | <img width="463" alt="Screen Shot 2023-02-10 at 5 24 00 PM" src="https://user-images.githubusercontent.com/23396902/218226415-59b2c42d-80e4-4a6d-a7dc-631a7f195ce9.png"> | <img width="463" alt="Screen Shot 2023-02-10 at 5 24 11 PM" src="https://user-images.githubusercontent.com/23396902/218226432-34b6cc5f-e0d0-48e1-af11-a2e59d0bd0e5.png"> | <img width="463" alt="Screen Shot 2023-02-10 at 5 24 28 PM" src="https://user-images.githubusercontent.com/23396902/218226448-d0c801a8-c232-449a-82e7-282108e9e44a.png"> | *the Setting control loses the active state when the mouse moves away from it, will be addressed in a follow-up. [![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/256) [![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/256) [![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/256) [![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/256) ACKs for top commit: GBKS: ACK 003f174 Tree-SHA512: bc6584cbf75e36ac6b4e944822756861159d6a5b355342e91e915c3c69562fd7b819a68dbe28904bf9fbacf825c57858386cc7b83680844e0625f0fdd304bee6
2 parents 7b168da + 003f174 commit 655365b

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

src/qml/components/DeveloperOptions.qml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ ColumnLayout {
3535
dbcacheSetting.forceActiveFocus()
3636
}
3737
}
38-
onClicked: loadedItem.forceActiveFocus()
38+
onClicked: {
39+
loadedItem.filled = true
40+
loadedItem.forceActiveFocus()
41+
}
3942
}
4043
Separator { Layout.fillWidth: true }
4144
Setting {
@@ -50,7 +53,10 @@ ColumnLayout {
5053
parSetting.forceActiveFocus()
5154
}
5255
}
53-
onClicked: loadedItem.forceActiveFocus()
56+
onClicked: {
57+
loadedItem.filled = true
58+
loadedItem.forceActiveFocus()
59+
}
5460
}
5561
Separator { Layout.fillWidth: true }
5662
Setting {

src/qml/components/StorageSettings.qml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ ColumnLayout {
4141
pruneTargetSetting.forceActiveFocus()
4242
}
4343
}
44-
onClicked: loadedItem.forceActiveFocus()
44+
onClicked: {
45+
loadedItem.filled = true
46+
loadedItem.forceActiveFocus()
47+
}
4548
}
4649
}

src/qml/controls/ValueInput.qml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ TextInput {
99
id: root
1010
required property string parentState
1111
property string description: ""
12+
property bool filled: false
1213
property int descriptionSize: 18
13-
property color textColor: Theme.color.neutral9
14+
property color textColor: root.filled ? Theme.color.neutral9 : Theme.color.neutral5
1415
enabled: true
1516
state: root.parentState
1617

@@ -21,7 +22,10 @@ TextInput {
2122
},
2223
State {
2324
name: "HOVER"
24-
PropertyChanges { target: root; textColor: Theme.color.orangeLight1 }
25+
PropertyChanges {
26+
target: root
27+
textColor: root.filled ? Theme.color.orangeLight1 : Theme.color.neutral5
28+
}
2529
},
2630
State {
2731
name: "DISABLED"

0 commit comments

Comments
 (0)