Making some more functional ui

This commit is contained in:
Chris Cochrun 2022-02-18 16:53:27 -06:00
parent ef1cb70d10
commit 2496f6708a
15 changed files with 218 additions and 236 deletions

View file

@ -78,6 +78,7 @@ Item {
Component {
id: itemDelegate
Kirigami.BasicListItem {
id: songListItem
width: ListView.view.width
height:40
label: title
@ -91,6 +92,34 @@ Item {
songAuthor = author
showPassiveNotification(songLyrics, 3000)
}
Drag.active: dragHandler.drag.active
Drag.hotSpot.x: width / 2
Drag.hotSpot.y: height / 2
MouseArea {
id: dragHandler
anchors.fill: parent
drag {
target: songListItem
onActiveChanged: {
if (dragHandler.drag.active) {
draggedLibraryItem = songLibraryList.currentItem
showPassiveNotification(index)
}
}
}
}
states: State {
name: "dragged"
when: songListItem.Drag.active
PropertyChanges {
target: songListItem
x: x
y: y
}
}
}
}