@@ -13,19 +13,17 @@ RowLayout {
13
13
id: root
14
14
15
15
property int selectedIndex: 1
16
- property string selectedLabel: feeModel .get (selectedIndex).feeLabel
16
+ property string selectedLabel: feeModel .get (root . selectedIndex ).feeLabel
17
17
18
18
signal feeChanged (int target)
19
19
20
- width: parent ? parent .width : 300
21
20
height: 40
22
21
23
22
CoreText {
24
- id: label
25
23
Layout .fillWidth : true
26
24
horizontalAlignment: Text .AlignLeft
27
- text: qsTr (" Fee" )
28
25
font .pixelSize : 15
26
+ text: qsTr (" Fee" )
29
27
}
30
28
31
29
Button {
@@ -123,12 +121,19 @@ RowLayout {
123
121
width: ListView .view .width
124
122
height: 40
125
123
126
- background: Rectangle {
127
- width: parent .width - 4
128
- height: parent .height - 4
129
- radius: 6
130
- color: Theme .color .neutral3
131
- visible: mouseArea .containsMouse
124
+ background: Item {
125
+ Rectangle {
126
+ anchors .fill : parent
127
+ radius: 6
128
+ color: Theme .color .neutral3
129
+ visible: delegate .hovered
130
+ }
131
+ Separator {
132
+ width: parent .width
133
+ anchors .top : parent .top
134
+ color: Theme .color .neutral2
135
+ visible: delegate .index > 0
136
+ }
132
137
}
133
138
134
139
contentItem: RowLayout {
@@ -149,26 +154,15 @@ RowLayout {
149
154
}
150
155
}
151
156
152
- MouseArea {
153
- id: mouseArea
154
- anchors .fill : parent
155
- hoverEnabled: true
157
+ HoverHandler {
156
158
cursorShape: Qt .PointingHandCursor
157
- onClicked: {
158
- root .selectedIndex = delegate .index
159
- root .selectedLabel = feeLabel
160
- root .feeChanged (target)
161
- feePopup .close ()
162
- }
163
159
}
164
160
165
- Rectangle {
166
- anchors .left : parent .left
167
- anchors .right : parent .right
168
- anchors .bottom : parent .bottom
169
- height: 1
170
- color: Theme .color .neutral3
171
- visible: delegate .index < feeModel .count - 1
161
+ onClicked: {
162
+ root .selectedIndex = delegate .index
163
+ root .selectedLabel = feeLabel
164
+ root .feeChanged (target)
165
+ feePopup .close ()
172
166
}
173
167
}
174
168
}
0 commit comments