[vlc-devel] [PATCH 30/30] qml: add shadows in NetworkThumbnailItem

Prince Gupta guptaprince8832 at gmail.com
Mon Dec 14 14:28:08 CET 2020


---
 .../qt/network/qml/NetworkThumbnailItem.qml   | 36 +++++++++++++------
 1 file changed, 25 insertions(+), 11 deletions(-)

diff --git a/modules/gui/qt/network/qml/NetworkThumbnailItem.qml b/modules/gui/qt/network/qml/NetworkThumbnailItem.qml
index 5a29c8be55..10ec46136e 100644
--- a/modules/gui/qt/network/qml/NetworkThumbnailItem.qml
+++ b/modules/gui/qt/network/qml/NetworkThumbnailItem.qml
@@ -37,6 +37,11 @@ Item {
 
     signal playClicked(var index)
 
+    Widgets.ListCoverShadow {
+        anchors.fill: artwork.visible ? artwork : background
+        source: artwork.visible ? artwork : background
+    }
+
     Rectangle {
         id: background
 
@@ -44,6 +49,7 @@ Item {
         color: VLCStyle.colors.bg
         width: VLCStyle.listAlbumCover_width
         height: VLCStyle.listAlbumCover_height
+        radius: VLCStyle.listAlbumCover_radius
         visible: !artwork.visible
 
         Image {
@@ -80,6 +86,16 @@ Item {
                      && rowModel.type !== NetworkMediaModel.TYPE_CARD
                      && rowModel.type !== NetworkMediaModel.TYPE_STREAM
         }
+
+        Widgets.PlayCover {
+            radius: background.radius
+            anchors.fill: parent
+            iconSize: VLCStyle.play_cover_small
+            visible: currentlyFocused || containsMouse
+            onIconClicked: playClicked(item.index)
+            onlyBorders: rowModel.type === NetworkMediaModel.TYPE_NODE
+                         || rowModel.type === NetworkMediaModel.TYPE_DIRECTORY
+        }
     }
 
     Image {
@@ -96,17 +112,15 @@ Item {
         visible: item.rowModel.artwork
                  && item.rowModel.artwork.toString() !== ""
         mipmap: true
-    }
 
-    Widgets.PlayCover {
-        x: artwork.visible ? artwork.x : background.x
-        y: artwork.visible ? artwork.y : background.y
-        width: artwork.visible ? artwork.paintedWidth : background.width
-        height: artwork.visible ? artwork.paintedHeight : background.height
-        iconSize: VLCStyle.play_cover_small
-        visible: currentlyFocused || containsMouse
-        onIconClicked: playClicked(item.index)
-        onlyBorders: rowModel.type === NetworkMediaModel.TYPE_NODE
-                     || rowModel.type === NetworkMediaModel.TYPE_DIRECTORY
+        Widgets.PlayCover {
+            width: artwork.paintedWidth
+            height: artwork.paintedHeight
+            iconSize: VLCStyle.play_cover_small
+            visible: currentlyFocused || containsMouse
+            onIconClicked: playClicked(item.index)
+            onlyBorders: rowModel.type === NetworkMediaModel.TYPE_NODE
+                         || rowModel.type === NetworkMediaModel.TYPE_DIRECTORY
+        }
     }
 }
-- 
2.25.1



More information about the vlc-devel mailing list