[vlc-devel] [PATCH 5/9] qml: show play cover on VideoList cover images

jagannatharjun guptaprince8832 at gmail.com
Fri Jun 5 17:27:21 CEST 2020


From: Prince Gupta <guptaprince8832 at gmail.com>

---
 .../gui/qt/medialibrary/qml/VideoListDisplay.qml    | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/medialibrary/qml/VideoListDisplay.qml b/modules/gui/qt/medialibrary/qml/VideoListDisplay.qml
index 25ed3d2386..daf21dc725 100644
--- a/modules/gui/qt/medialibrary/qml/VideoListDisplay.qml
+++ b/modules/gui/qt/medialibrary/qml/VideoListDisplay.qml
@@ -64,6 +64,8 @@ Widgets.KeyNavigableTableView {
 
         property var rowModel: parent.rowModel
         property var model: parent.colModel
+        readonly property bool currentlyFocused: parent.currentlyFocused
+        readonly property bool containsMouse: parent.containsMouse
 
         anchors.fill: parent
 
@@ -106,7 +108,7 @@ Widgets.KeyNavigableTableView {
                     }
                     Widgets.VideoProgressBar {
                         value: !rowModel ? 0 : rowModel.progress
-                        visible: value > 0
+                        visible: !playCover.visible && value > 0
                         anchors {
                             bottom: parent.bottom
                             left: parent.left
@@ -114,6 +116,15 @@ Widgets.KeyNavigableTableView {
                         }
                     }
 
+                    Widgets.PlayCover {
+                        id: playCover
+
+                        anchors.fill: parent
+                        iconSize: VLCStyle.play_cover_small
+                        visible: colDel.currentlyFocused || colDel.containsMouse
+
+                        onIconClicked: medialib.addAndPlay( rowModel.id )
+                    }
                 }
             }
             Loader{
-- 
2.25.1



More information about the vlc-devel mailing list