[vlc-commits] qml: show play cover on MusicTrackList cover images

Prince Gupta git at videolan.org
Tue Jun 9 11:03:08 CEST 2020


vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Fri Jun  5 21:15:20 2020 +0530| [0ea1f97966cc6944db0363eac123252d4ffd76b2] | committer: Pierre Lamot

qml: show play cover on MusicTrackList cover images

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0ea1f97966cc6944db0363eac123252d4ffd76b2
---

 modules/gui/qt/medialibrary/qml/MusicTrackListDisplay.qml | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/modules/gui/qt/medialibrary/qml/MusicTrackListDisplay.qml b/modules/gui/qt/medialibrary/qml/MusicTrackListDisplay.qml
index 6b324a9c3b..a97aa2ad20 100644
--- a/modules/gui/qt/medialibrary/qml/MusicTrackListDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/MusicTrackListDisplay.qml
@@ -54,6 +54,8 @@ Widgets.KeyNavigableTableView {
     property Component titleDelegate: RowLayout {
         property var rowModel: parent.rowModel
         property var model: parent.colModel
+        readonly property bool containsMouse: parent.containsMouse
+        readonly property bool currentlyFocused: parent.currentlyFocused
 
         anchors.fill: parent
         spacing: VLCStyle.margin_normal
@@ -64,6 +66,14 @@ Widgets.KeyNavigableTableView {
 
             Layout.preferredHeight: VLCStyle.heightAlbumCover_xsmall
             Layout.preferredWidth: VLCStyle.heightAlbumCover_xsmall
+
+            Widgets.PlayCover {
+                anchors.fill: parent
+                iconSize: VLCStyle.play_cover_small
+                visible: currentlyFocused || containsMouse
+
+                onIconClicked: medialib.addAndPlay( rowModel.id )
+            }
         }
 
         Widgets.ListLabel {



More information about the vlc-commits mailing list