@@ -22,6 +22,7 @@ Button {
22
22
property bool showBalance: true
23
23
property bool showIcon: true
24
24
property string balance: " 0.0 000 000"
25
+ property bool loading: false
25
26
26
27
checkable: true
27
28
hoverEnabled: AppMode .isDesktop
@@ -31,39 +32,74 @@ Button {
31
32
topPadding: 0
32
33
clip: true
33
34
34
- contentItem: RowLayout {
35
- anchors .leftMargin : 5
36
- anchors .rightMargin : 5
37
- clip: true
38
- spacing: 5
39
- Icon {
40
- id: icon
41
- visible: root .showIcon
42
- source: " image://images/singlesig-wallet"
43
- color: Theme .color .neutral8
44
- size: 30
45
- Layout .minimumWidth : 30
46
- Layout .preferredWidth : 30
47
- Layout .maximumWidth : 30
48
- }
49
- ColumnLayout {
50
- spacing: 2
51
- CoreText {
52
- horizontalAlignment: Text .AlignLeft
35
+ contentItem: Item {
36
+ anchors .fill : parent
37
+
38
+ RowLayout {
39
+ visible: root .loading
40
+ anchors .leftMargin : 5
41
+ anchors .rightMargin : 5
42
+ anchors .centerIn : parent
43
+ spacing: 5
44
+
45
+ Skeleton {
46
+ Layout .preferredHeight : 30
47
+ Layout .preferredWidth : 30
48
+ }
49
+ ColumnLayout {
50
+ spacing: 2
51
+ Layout .preferredHeight : 30
53
52
Layout .fillWidth : true
54
- wrap: false
55
- id: buttonText
56
- font .pixelSize : 13
57
- text: root .text
58
- color: root .textColor
59
- bold: true
60
- visible: root .text !== " "
53
+
54
+ Skeleton {
55
+ Layout .preferredHeight : 15
56
+ Layout .preferredWidth : 50
57
+ }
58
+
59
+ Skeleton {
60
+ Layout .preferredHeight : 15
61
+ Layout .preferredWidth : 114
62
+ }
63
+ }
64
+ }
65
+
66
+ RowLayout {
67
+ visible: ! root .loading
68
+
69
+ anchors .leftMargin : 5
70
+ anchors .rightMargin : 5
71
+ anchors .centerIn : parent
72
+ clip: true
73
+ spacing: 5
74
+ Icon {
75
+ id: icon
76
+ visible: root .showIcon
77
+ source: " image://images/singlesig-wallet"
78
+ color: Theme .color .neutral8
79
+ size: 30
80
+ Layout .minimumWidth : 30
81
+ Layout .preferredWidth : 30
82
+ Layout .maximumWidth : 30
61
83
}
62
- CoreText {
63
- id: balanceText
64
- visible: root .showBalance
65
- text: " ₿ " + root .balance
66
- color: Theme .color .neutral7
84
+ ColumnLayout {
85
+ spacing: 2
86
+ CoreText {
87
+ horizontalAlignment: Text .AlignLeft
88
+ Layout .fillWidth : true
89
+ wrap: false
90
+ id: buttonText
91
+ font .pixelSize : 13
92
+ text: root .text
93
+ color: root .textColor
94
+ bold: true
95
+ visible: root .text !== " "
96
+ }
97
+ CoreText {
98
+ id: balanceText
99
+ visible: root .showBalance
100
+ text: " ₿ " + root .balance
101
+ color: Theme .color .neutral7
102
+ }
67
103
}
68
104
}
69
105
}
0 commit comments