[vlc-commits] qml: add shadows in NetworkThumbnailItem

Prince Gupta git at videolan.org
Thu Dec 17 14:57:29 UTC 2020


vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Tue Dec  8 21:16:04 2020 +0530| [dd2dbe3a3dffff6d04da2d109a9efa17b2bfc46d] | committer: Pierre Lamot

qml: add shadows in NetworkThumbnailItem

Signed-off-by: Pierre Lamot <pierre at videolabs.io>

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

 .../gui/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 282dd96bca..7d50e5f698 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
 
         NetworkCustomCover {
@@ -51,6 +57,16 @@ Item {
             anchors.fill: parent
             iconSize: VLCStyle.icon_small
         }
+
+        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 {
@@ -67,17 +83,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
+        }
     }
 }



More information about the vlc-commits mailing list