extract HoverableListItem component from list delegates

This commit is contained in:
Damocles 2026-04-23 23:36:03 +02:00
parent 85e32dcd8c
commit e712842424
5 changed files with 29 additions and 47 deletions

View file

@ -9,24 +9,13 @@ Column {
Repeater {
model: S.BluetoothService.devices
delegate: Item {
delegate: HoverableListItem {
id: entry
required property var modelData
required property int index
readonly property bool _pending: S.BluetoothService.pendingMac === entry.modelData.mac
width: root.width
height: 32
Rectangle {
anchors.fill: parent
anchors.leftMargin: 4
anchors.rightMargin: 4
color: entryHover.hovered ? S.Theme.base02 : "transparent"
radius: S.Theme.radius
}
Text {
id: btIcon
anchors.left: parent.left
@ -83,10 +72,6 @@ Column {
entry.opacity = 1
}
HoverHandler {
id: entryHover
cursorShape: Qt.PointingHandCursor
}
TapHandler {
onTapped: {
if (!entry._pending)