Skip to content

Commit e41eabf

Browse files
committed
qml: Disable Send/Receive forms when loading
1 parent 3a29670 commit e41eabf

File tree

8 files changed

+23
-22
lines changed

8 files changed

+23
-22
lines changed

src/qml/components/Separator.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import "../controls"
88

99
Rectangle {
1010
height: 1
11-
color: Theme.color.neutral5
11+
color: enabled ? Theme.color.neutral5 : Theme.color.neutral2
1212

1313
Behavior on color {
1414
ColorAnimation { duration: 150 }

src/qml/controls/CoreText.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import QtQuick.Controls 2.15
88
Text {
99
property bool bold: false
1010
property bool wrap: true
11-
color: Theme.color.neutral9
11+
color: enabled ? Theme.color.neutral9 : Theme.color.neutral2
1212
font.family: "Inter"
1313
font.styleName: bold ? "Semi Bold" : "Regular"
1414
font.pixelSize: 13

src/qml/controls/EllipsisMenuButton.qml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ Button {
4343
State {
4444
name: "HOVER"; when: root.hovered
4545
PropertyChanges { target: ellipsisIcon; color: hoverColor }
46+
},
47+
State {
48+
name: "DISABLED"; when: !root.enabled
49+
PropertyChanges { target: ellipsisIcon; color: Theme.color.neutral2 }
4650
}
4751
]
4852
}

src/qml/controls/LabeledCoinControlButton.qml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Item {
2121
anchors.verticalCenter: parent.verticalCenter
2222
horizontalAlignment: Text.AlignLeft
2323
width: 110
24-
color: Theme.color.neutral9
2524
font.pixelSize: 18
2625
text: qsTr("Inputs")
2726
}
@@ -30,7 +29,7 @@ Item {
3029
anchors.left: label.right
3130
anchors.verticalCenter: parent.verticalCenter
3231
horizontalAlignment: Text.AlignLeft
33-
color: Theme.color.orangeLight1
32+
color: enabled ? Theme.color.orangeLight1 : Theme.color.neutral2
3433
font.pixelSize: 18
3534
text: {
3635
if (coinCount === 0) {

src/qml/controls/LabeledTextInput.qml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ Item {
2626
anchors.verticalCenter: parent.verticalCenter
2727
horizontalAlignment: Text.AlignLeft
2828
width: 110
29-
color: Theme.color.neutral9
3029
font.pixelSize: 18
3130
}
3231

@@ -40,7 +39,7 @@ Item {
4039
font.styleName: "Regular"
4140
font.pixelSize: 18
4241
color: Theme.color.neutral9
43-
placeholderTextColor: Theme.color.neutral7
42+
placeholderTextColor: enabled ? Theme.color.neutral7 : Theme.color.neutral2
4443
background: Item {}
4544
selectByMouse: true
4645
onTextEdited: root.textEdited()
@@ -54,7 +53,7 @@ Item {
5453
Icon {
5554
id: icon
5655
source: ""
57-
color: Theme.color.neutral8
56+
color: enabled ? Theme.color.neutral8 : Theme.color.neutral2
5857
size: 30
5958
enabled: source != ""
6059
onClicked: root.iconClicked()

src/qml/controls/NavButton.qml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ AbstractButton {
1515
property int textSize: 18
1616
property url iconSource: ""
1717
property Rectangle iconBackground: null
18-
property color iconColor: Theme.color.neutral9
18+
property color iconColor: enabled ? Theme.color.neutral9 : Theme.color.neutral2
1919
hoverEnabled: AppMode.isDesktop
2020
topPadding: text_background.active ? 7 : 14
2121
bottomPadding: text_background.active ? 7 : 14
@@ -88,7 +88,6 @@ AbstractButton {
8888
anchors.verticalCenter: parent.verticalCenter
8989
bold: true
9090
font.pixelSize: root.textSize
91-
color: Theme.color.neutral9
9291
text: root.text
9392
}
9493
}

src/qml/pages/wallet/RequestPayment.qml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ Page {
3535

3636
RowLayout {
3737
id: contentRow
38+
39+
enabled: walletController.initialized
40+
3841
anchors.top: title.bottom
3942
anchors.topMargin: 40
4043
anchors.horizontalCenter: parent.horizontalCenter
@@ -59,7 +62,6 @@ Page {
5962
anchors.left: parent.left
6063
anchors.verticalCenter: parent.verticalCenter
6164
horizontalAlignment: Text.AlignLeft
62-
color: Theme.color.neutral9
6365
text: "Amount"
6466
font.pixelSize: 18
6567
}
@@ -73,7 +75,7 @@ Page {
7375
font.styleName: "Regular"
7476
font.pixelSize: 18
7577
color: Theme.color.neutral9
76-
placeholderTextColor: Theme.color.neutral7
78+
placeholderTextColor: enabled ? Theme.color.neutral7 : Theme.color.neutral2
7779
background: Item {}
7880
placeholderText: "0.00000000"
7981
selectByMouse: true
@@ -104,14 +106,14 @@ Page {
104106
anchors.verticalCenter: parent.verticalCenter
105107
text: bitcoinAmount.unitLabel
106108
font.pixelSize: 18
107-
color: Theme.color.neutral7
109+
color: enabled ? Theme.color.neutral7 : Theme.color.neutral2
108110
}
109111
Icon {
110112
id: flipIcon
111113
anchors.right: parent.right
112114
anchors.verticalCenter: parent.verticalCenter
113115
source: "image://images/flip-vertical"
114-
color: Theme.color.neutral8
116+
color: unitLabel.enabled ? Theme.color.neutral8 : Theme.color.neutral2
115117
size: 30
116118
}
117119
}
@@ -156,7 +158,6 @@ Page {
156158
width: 110
157159
text: qsTr("Address")
158160
font.pixelSize: 18
159-
color: Theme.color.neutral9
160161
}
161162
CoreText {
162163
id: copyLabel
@@ -166,7 +167,7 @@ Page {
166167
width: 110
167168
text: qsTr("copy")
168169
font.pixelSize: 18
169-
color: Theme.color.neutral7
170+
color: enabled ? Theme.color.neutral7 : Theme.color.neutral2
170171
}
171172

172173
Rectangle {
@@ -182,7 +183,6 @@ Page {
182183
anchors.leftMargin: 5
183184
horizontalAlignment: Text.AlignLeft
184185
font.pixelSize: 18
185-
color: Theme.color.neutral9
186186
wrap: true
187187
}
188188
}

src/qml/pages/wallet/Send.qml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ PageStack {
4848

4949
spacing: 10
5050

51+
enabled: walletController.initialized
52+
5153
Item {
5254
id: titleRow
5355
Layout.fillWidth: true
@@ -59,6 +61,7 @@ PageStack {
5961
anchors.verticalCenter: parent.verticalCenter
6062
text: qsTr("Send bitcoin")
6163
font.pixelSize: 21
64+
color: Theme.color.neutral9
6265
bold: true
6366
}
6467
EllipsisMenuButton {
@@ -106,7 +109,6 @@ PageStack {
106109
anchors.left: parent.left
107110
anchors.verticalCenter: parent.verticalCenter
108111
horizontalAlignment: Text.AlignLeft
109-
color: Theme.color.neutral9
110112
text: qsTr("Amount")
111113
font.pixelSize: 18
112114
}
@@ -120,7 +122,7 @@ PageStack {
120122
font.styleName: "Regular"
121123
font.pixelSize: 18
122124
color: Theme.color.neutral9
123-
placeholderTextColor: Theme.color.neutral7
125+
placeholderTextColor: enabled ? Theme.color.neutral7 : Theme.color.neutral2
124126
background: Item {}
125127
placeholderText: "0.00000000"
126128
selectByMouse: true
@@ -152,14 +154,14 @@ PageStack {
152154
anchors.verticalCenter: parent.verticalCenter
153155
text: bitcoinAmount.unitLabel
154156
font.pixelSize: 18
155-
color: Theme.color.neutral7
157+
color: enabled ? Theme.color.neutral7 : Theme.color.neutral2
156158
}
157159
Icon {
158160
id: flipIcon
159161
anchors.right: parent.right
160162
anchors.verticalCenter: parent.verticalCenter
161163
source: "image://images/flip-vertical"
162-
color: Theme.color.neutral8
164+
icon.color: unitLabel.enabled ? Theme.color.neutral8 : Theme.color.neutral2
163165
size: 30
164166
}
165167
}
@@ -204,7 +206,6 @@ PageStack {
204206
id: feeLabel
205207
anchors.left: parent.left
206208
anchors.top: parent.top
207-
color: Theme.color.neutral9
208209
text: "Fee"
209210
font.pixelSize: 15
210211
}
@@ -213,7 +214,6 @@ PageStack {
213214
id: feeValue
214215
anchors.right: parent.right
215216
anchors.top: parent.top
216-
color: Theme.color.neutral9
217217
text: qsTr("Default (~2,000 sats)")
218218
font.pixelSize: 15
219219
}

0 commit comments

Comments
 (0)