extract HoverableListItem component from list delegates
This commit is contained in:
parent
85e32dcd8c
commit
e712842424
5 changed files with 29 additions and 47 deletions
25
shell/applets/HoverableListItem.qml
Normal file
25
shell/applets/HoverableListItem.qml
Normal 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
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue