@@ -14,6 +14,7 @@ RowLayout {
14
14
15
15
property int selectedIndex: 1
16
16
property string selectedLabel: feeModel .get (root .selectedIndex ).feeLabel
17
+ property string selectedDuration: feeModel .get (root .selectedIndex ).feeDuration
17
18
18
19
signal feeChanged (int target)
19
20
@@ -22,30 +23,49 @@ RowLayout {
22
23
CoreText {
23
24
Layout .fillWidth : true
24
25
horizontalAlignment: Text .AlignLeft
25
- font .pixelSize : 15
26
+ font .pixelSize : 18
26
27
text: qsTr (" Fee" )
27
28
}
28
29
29
30
Button {
30
31
id: dropDownButton
31
32
text: root .selectedLabel
32
- font .pixelSize : 15
33
+ font .pixelSize : 18
33
34
34
35
hoverEnabled: true
35
36
37
+ leftPadding: 10
38
+ rightPadding: 4
39
+ topPadding: 2
40
+ bottomPadding: 2
41
+ height: 28
42
+
36
43
HoverHandler {
37
44
cursorShape: Qt .PointingHandCursor
38
45
}
39
46
40
47
onPressed: feePopup .open ()
41
48
42
49
contentItem: RowLayout {
43
- spacing: 5
50
+ spacing: 0
44
51
45
52
CoreText {
46
53
id: value
47
54
text: root .selectedLabel
48
- font .pixelSize : 15
55
+ font .pixelSize : 18
56
+
57
+ Behavior on color {
58
+ ColorAnimation { duration: 150 }
59
+ }
60
+ }
61
+
62
+ Item { width: 5 }
63
+
64
+ CoreText {
65
+ id: duration
66
+ text: root .selectedDuration
67
+ font .pixelSize : 18
68
+ color: dropDownButton .enabled ? Theme .color .neutral7 : Theme .color .neutral4
49
69
50
70
Behavior on color {
51
71
ColorAnimation { duration: 150 }
@@ -98,13 +118,14 @@ RowLayout {
98
118
background: Rectangle {
99
119
color: Theme .color .background
100
120
radius: 6
101
- border .color : Theme .color .neutral3
121
+ border .color : Theme .color .neutral4
102
122
}
103
123
104
124
width: 260
105
- height: Math .min (feeModel .count * 40 + 20 , 300 )
125
+ height: Math .min (feeModel .count * 36 + 10 , 300 )
106
126
x: feePopup .parent .width - feePopup .width
107
- y: feePopup .parent .height
127
+ y: feePopup .parent .height + 2
128
+ padding: 5
108
129
109
130
contentItem: ListView {
110
131
id: feeList
@@ -115,35 +136,42 @@ RowLayout {
115
136
delegate: ItemDelegate {
116
137
id: delegate
117
138
required property string feeLabel
139
+ required property string feeDuration
118
140
required property int index
119
141
required property int target
120
142
121
143
width: ListView .view .width
122
- height: 40
144
+ height: 36
145
+
146
+ leftPadding: 10
147
+ rightPadding: 4
148
+ topPadding: 2
149
+ bottomPadding: 2
123
150
124
151
background: Item {
125
152
Rectangle {
126
153
anchors .fill : parent
127
154
radius: 6
128
- color: Theme .color .neutral3
129
- visible: delegate .hovered
130
- }
131
- Separator {
132
- width: parent .width
133
- anchors .top : parent .top
134
155
color: Theme .color .neutral2
135
- visible: delegate .index > 0
156
+ visible: delegate .hovered
136
157
}
137
158
}
138
159
139
160
contentItem: RowLayout {
140
- spacing: 10
161
+ spacing: 5
141
162
142
163
CoreText {
143
164
text: feeLabel
144
165
horizontalAlignment: Text .AlignLeft
166
+ font .pixelSize : 15
167
+ }
168
+
169
+ CoreText {
170
+ text: feeDuration
171
+ horizontalAlignment: Text .AlignLeft
145
172
Layout .fillWidth : true
146
173
font .pixelSize : 15
174
+ color: Theme .color .neutral7
147
175
}
148
176
149
177
Icon {
@@ -161,6 +189,7 @@ RowLayout {
161
189
onClicked: {
162
190
root .selectedIndex = delegate .index
163
191
root .selectedLabel = feeLabel
192
+ root .selectedDuration = feeDuration
164
193
root .feeChanged (target)
165
194
feePopup .close ()
166
195
}
@@ -170,8 +199,8 @@ RowLayout {
170
199
171
200
ListModel {
172
201
id: feeModel
173
- ListElement { feeLabel: qsTr (" High (~10 mins)" ); target: 1 }
174
- ListElement { feeLabel: qsTr (" Default (~60 mins)" ); target: 6 }
175
- ListElement { feeLabel: qsTr (" Low (~24 hrs)" ); target: 144 }
202
+ ListElement { feeLabel: qsTr (" High" ); feeDuration : qsTr ( " (~10 mins)" ); target: 1 }
203
+ ListElement { feeLabel: qsTr (" Default" ); feeDuration : qsTr ( " (~60 mins)" ); target: 6 }
204
+ ListElement { feeLabel: qsTr (" Low" ); feeDuration : qsTr ( " (~24 hrs)" ); target: 144 }
176
205
}
177
206
}
0 commit comments