[vlc-commits] qml: hide media info in Player Widget according to height available
Prince Gupta
git at videolan.org
Mon Feb 8 10:00:27 UTC 2021
vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Fri Jan 29 18:24:53 2021 +0530| [3bedbca95c79e7c81fb56791f104fbd9fd9fd230] | committer: Pierre Lamot
qml: hide media info in Player Widget according to height available
Signed-off-by: Pierre Lamot <pierre at videolabs.io>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=3bedbca95c79e7c81fb56791f104fbd9fd9fd230
---
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
More information about the vlc-commits
mailing list