Making some more functional ui
This commit is contained in:
parent
ef1cb70d10
commit
2496f6708a
15 changed files with 218 additions and 236 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue