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

@ -0,0 +1,25 @@
import QtQuick
import "../services" as S
Item {
id: root
readonly property bool hovered: _hover.hovered
width: parent?.width ?? 0
height: 32
Rectangle {
anchors.fill: parent
anchors.leftMargin: 4
anchors.rightMargin: 4
color: root.hovered ? S.Theme.base02 : "transparent"
radius: S.Theme.radius
z: -1
}
HoverHandler {
id: _hover
cursorShape: Qt.PointingHandCursor
}
}