[vlc-devel] [PATCH 04/18] qml: allow overlay on covers in GridItem

Prince Gupta guptaprince8832 at gmail.com
Wed Sep 23 19:40:02 CEST 2020


---
 modules/gui/qt/widgets/qml/GridItem.qml   | 1 +
 modules/gui/qt/widgets/qml/MediaCover.qml | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/modules/gui/qt/widgets/qml/GridItem.qml b/modules/gui/qt/widgets/qml/GridItem.qml
index 792d7cb757..ebd34d0f85 100644
--- a/modules/gui/qt/widgets/qml/GridItem.qml
+++ b/modules/gui/qt/widgets/qml/GridItem.qml
@@ -36,6 +36,7 @@ FocusScope {
     property alias playCoverOnlyBorders: picture.playCoverOnlyBorders
     property alias playIconSize: picture.playIconSize
     property alias pictureRadius: picture.radius
+    property alias pictureOverlay: picture.imageOverlay
     property bool selected: false
 
     property alias progress: picture.progress
diff --git a/modules/gui/qt/widgets/qml/MediaCover.qml b/modules/gui/qt/widgets/qml/MediaCover.qml
index 9b06b2bb66..b3c6e18513 100644
--- a/modules/gui/qt/widgets/qml/MediaCover.qml
+++ b/modules/gui/qt/widgets/qml/MediaCover.qml
@@ -32,11 +32,18 @@ Widgets.RoundImage {
     property alias playCoverOnlyBorders: playCover.onlyBorders
     property alias playIconSize: playCover.iconSize
     property alias playCoverBorder: playCover.border
+    property alias imageOverlay: overlay.sourceComponent
     signal playIconClicked
 
     height: VLCStyle.listAlbumCover_height
     width: VLCStyle.listAlbumCover_width
 
+    Loader {
+        id: overlay
+
+        anchors.fill: parent
+    }
+
     RowLayout {
         anchors {
             top: parent.top
-- 
2.25.1



More information about the vlc-devel mailing list