diff options
-rw-r--r-- | res/qml/Library.qml | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/res/qml/Library.qml b/res/qml/Library.qml index 1aca01955a..706d4e263e 100644 --- a/res/qml/Library.qml +++ b/res/qml/Library.qml @@ -9,21 +9,34 @@ Item { anchors.fill: parent ListView { + id: listView + anchors.fill: parent anchors.margins: 10 clip: true + focus: true + highlightMoveDuration: 250 + highlightResizeDuration: 50 model: Mixxx.Library.model delegate: Item { id: itemDelegate - implicitWidth: 300 + implicitWidth: listView.width implicitHeight: 30 Text { - anchors.fill: parent + anchors.verticalCenter: parent.verticalCenter text: artist + " - " + title - color: Theme.deckTextColor + color: listView.currentIndex == index ? Theme.blue : Theme.deckTextColor + + Behavior on color { + ColorAnimation { + duration: listView.highlightMoveDuration + } + + } + } Image { @@ -44,13 +57,22 @@ Item { anchors.fill: parent drag.target: dragItem - onPressed: parent.grabToImage((result) => { - dragItem.Drag.imageSource = result.url; - }) + onPressed: { + listView.currentIndex = index; + parent.grabToImage((result) => { + dragItem.Drag.imageSource = result.url; + }); + } } } + highlight: Rectangle { + border.color: Theme.blue + border.width: 1 + color: "transparent" + } + } } |