Skip to content

Commit 9d73c5c

Browse files
committed
qml: Update layout and colors for AddWallet button
1 parent 461d718 commit 9d73c5c

File tree

2 files changed

+30
-30
lines changed

2 files changed

+30
-30
lines changed

src/qml/controls/AddWalletButton.qml

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -15,37 +15,34 @@ Button {
1515
property color textColor: Theme.color.neutral7
1616
property color textHoverColor: Theme.color.orange
1717
property color textActiveColor: Theme.color.orange
18-
property color iconColor: "transparent"
19-
property string iconSource: ""
20-
property bool showBalance: true
21-
property bool showIcon: true
2218

2319
hoverEnabled: AppMode.isDesktop
24-
implicitHeight: 46
20+
implicitHeight: 30
2521
implicitWidth: 220
26-
bottomPadding: 10
27-
topPadding: 0
2822

29-
contentItem: RowLayout {
30-
implicitWidth: addIcon.size + addText.width
31-
implicitHeight: 45
32-
Icon {
33-
id: addIcon
34-
Layout.alignment: Qt.AlignHCenter
35-
source: "image://images/plus"
36-
color: Theme.color.neutral8
37-
size: 14
38-
topPadding: 5
39-
bottomPadding: 10
40-
}
41-
CoreText {
42-
id: addText
43-
Layout.alignment: Qt.AlignHCenter
44-
text: qsTr("Add Wallet")
45-
color: Theme.color.neutral9
46-
font.pixelSize: 15
47-
topPadding: 5
48-
bottomPadding: 10
23+
contentItem: Item {
24+
anchors.fill: parent
25+
RowLayout {
26+
anchors.centerIn: parent
27+
spacing: 3
28+
Icon {
29+
id: addIcon
30+
Layout.alignment: Qt.AlignRight
31+
source: "image://images/plus"
32+
color: Theme.color.neutral7
33+
size: 16
34+
Layout.minimumWidth: 16
35+
Layout.preferredWidth: 16
36+
Layout.maximumWidth: 16
37+
}
38+
CoreText {
39+
id: addText
40+
Layout.fillHeight: true
41+
Layout.alignment: Qt.AlignLeft
42+
text: qsTr("Add Wallet")
43+
color: Theme.color.neutral7
44+
font.pixelSize: 15
45+
}
4946
}
5047
}
5148

@@ -54,8 +51,6 @@ Button {
5451
height: 30
5552
width: 220
5653
radius: 5
57-
anchors.topMargin: 5
58-
anchors.bottomMargin: 10
5954
color: Theme.color.neutral3
6055
visible: root.hovered || root.checked
6156

@@ -74,6 +69,8 @@ Button {
7469
},
7570
State {
7671
name: "HOVER"; when: root.hovered
72+
PropertyChanges { target: addText; color: textHoverColor }
73+
PropertyChanges { target: addIcon; color: textHoverColor }
7774
}
7875
]
7976
}

src/qml/pages/wallet/WalletSelect.qml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Popup {
1212
id: root
1313

1414
property alias model: listView.model
15-
implicitHeight: layout.height + arrow.height
15+
implicitHeight: layout.height + arrow.height + 11
1616
implicitWidth: 250
1717
clip: true
1818

@@ -93,6 +93,9 @@ Popup {
9393

9494
AddWalletButton {
9595
id: addWallet
96+
Layout.alignment: Qt.AlignHCenter
97+
Layout.preferredWidth: 220
98+
Layout.preferredHeight: 30
9699
onClicked: {
97100
root.addWallet()
98101
root.close()

0 commit comments

Comments
 (0)