[vlc-devel] [PATCH 10/30] qml: vertically center content in NetworkThumbnailItem

Prince Gupta guptaprince8832 at gmail.com
Mon Dec 14 14:27:48 CET 2020


---
 modules/gui/qt/network/qml/NetworkThumbnailItem.qml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/gui/qt/network/qml/NetworkThumbnailItem.qml b/modules/gui/qt/network/qml/NetworkThumbnailItem.qml
index a031114080..5a29c8be55 100644
--- a/modules/gui/qt/network/qml/NetworkThumbnailItem.qml
+++ b/modules/gui/qt/network/qml/NetworkThumbnailItem.qml
@@ -40,6 +40,7 @@ Item {
     Rectangle {
         id: background
 
+        anchors.verticalCenter: parent.verticalCenter
         color: VLCStyle.colors.bg
         width: VLCStyle.listAlbumCover_width
         height: VLCStyle.listAlbumCover_height
@@ -85,7 +86,7 @@ Item {
         id: artwork
 
         x: (width - paintedWidth) / 2
-        y: (height - paintedHeight) / 2
+        y: (parent.height - paintedHeight) / 2
         width: VLCStyle.listAlbumCover_width
         height: VLCStyle.listAlbumCover_height
         fillMode: Image.PreserveAspectFit
-- 
2.25.1



More information about the vlc-devel mailing list