@@ -13,19 +13,17 @@ RowLayout {
1313 id: root
1414
1515 property int selectedIndex: 1
16- property string selectedLabel: feeModel .get (selectedIndex).feeLabel
16+ property string selectedLabel: feeModel .get (root . selectedIndex ).feeLabel
1717
1818 signal feeChanged (int target)
1919
20- width: parent ? parent .width : 300
2120 height: 40
2221
2322 CoreText {
24- id: label
2523 Layout .fillWidth : true
2624 horizontalAlignment: Text .AlignLeft
27- text: qsTr (" Fee" )
2825 font .pixelSize : 15
26+ text: qsTr (" Fee" )
2927 }
3028
3129 Button {
@@ -123,12 +121,19 @@ RowLayout {
123121 width: ListView .view .width
124122 height: 40
125123
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+ }
132137 }
133138
134139 contentItem: RowLayout {
@@ -149,26 +154,15 @@ RowLayout {
149154 }
150155 }
151156
152- MouseArea {
153- id: mouseArea
154- anchors .fill : parent
155- hoverEnabled: true
157+ HoverHandler {
156158 cursorShape: Qt .PointingHandCursor
157- onClicked: {
158- root .selectedIndex = delegate .index
159- root .selectedLabel = feeLabel
160- root .feeChanged (target)
161- feePopup .close ()
162- }
163159 }
164160
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 ()
172166 }
173167 }
174168 }
0 commit comments