[vlc-devel] [PATCH 33/33] qml: hide media info in Player Widget according to height available

Prince Gupta guptaprince8832 at gmail.com
Wed Feb 3 10:56:49 UTC 2021


---
 modules/gui/qt/player/qml/Player.qml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/player/qml/Player.qml b/modules/gui/qt/player/qml/Player.qml
index 435b8364c8..a259a086c6 100644
--- a/modules/gui/qt/player/qml/Player.qml
+++ b/modules/gui/qt/player/qml/Player.qml
@@ -320,7 +320,7 @@ Widgets.NavigableFocusScope {
         }
 
         Item {
-            id: centralLayout
+            id: centerContent
 
             Layout.fillWidth: true
             Layout.fillHeight: true
@@ -372,6 +372,7 @@ Widgets.NavigableFocusScope {
                     Layout.preferredHeight: implicitHeight
                     Layout.topMargin: VLCStyle.margin_xxlarge
 
+                    visible: centerContent.height > (albumLabel.y + albumLabel.height)
                     text: mainPlaylistController.currentItem.album
                     font.pixelSize: VLCStyle.fontSize_xxlarge
                     horizontalAlignment: Text.AlignHCenter
@@ -386,6 +387,7 @@ Widgets.NavigableFocusScope {
                     Layout.preferredHeight: implicitHeight
                     Layout.topMargin: VLCStyle.margin_small
 
+                    visible: centerContent.height > (artistLabel.y + artistLabel.height)
                     text: mainPlaylistController.currentItem.artist
                     font.weight: Font.Light
                     horizontalAlignment: Text.AlignHCenter
@@ -400,7 +402,7 @@ Widgets.NavigableFocusScope {
                     Layout.preferredWidth: implicitWidth
                     Layout.topMargin: VLCStyle.margin_large
                     Layout.alignment: Qt.AlignHCenter
-                    visible: player.videoTracks.count === 0
+                    visible: player.videoTracks.count === 0 && centerContent.height > (audioControls.y + audioControls.height)
                     focus: visible
                     spacing: VLCStyle.margin_xxsmall
                     navigationParent: rootPlayer
-- 
2.25.1



More information about the vlc-devel mailing list