[vlc-commits] qml: vertically center content in NetworkThumbnailItem

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


vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Fri Dec  4 18:48:02 2020 +0530| [95cababc0be52cf44d87986b5837640fbc875a81] | committer: Pierre Lamot

qml: vertically center content in NetworkThumbnailItem

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

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

 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 ea23a89497..282dd96bca 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
@@ -56,7 +57,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



More information about the vlc-commits mailing list