[vlc-commits] qml: don't show resolution or audio channels label when unknown
Pierre Lamot
git at videolan.org
Fri Jan 10 15:06:53 CET 2020
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Mon Dec 23 13:32:06 2019 +0100| [e9f4e6f8b8adbd49dda1e4090b03bfb50a8f712b] | committer: Jean-Baptiste Kempf
qml: don't show resolution or audio channels label when unknown
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e9f4e6f8b8adbd49dda1e4090b03bfb50a8f712b
---
modules/gui/qt/medialibrary/mlvideo.cpp | 2 +-
modules/gui/qt/widgets/qml/GridItem.qml | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/gui/qt/medialibrary/mlvideo.cpp b/modules/gui/qt/medialibrary/mlvideo.cpp
index 2d9d385cac..df2968578b 100644
--- a/modules/gui/qt/medialibrary/mlvideo.cpp
+++ b/modules/gui/qt/medialibrary/mlvideo.cpp
@@ -107,7 +107,7 @@ MLVideo::MLVideo(vlc_medialibrary_t* ml, const vlc_ml_media_t* data, QObject* pa
else if ( numChannel >= 6 )
m_channel = "5.1";
- m_resolution = "SD";
+ m_resolution = "";
if ( maxWidth >= 7680 && maxHeight >= 4320 )
m_resolution = "8K";
else if ( maxWidth >= 3840 && maxHeight >= 2160 )
diff --git a/modules/gui/qt/widgets/qml/GridItem.qml b/modules/gui/qt/widgets/qml/GridItem.qml
index 0a648e823b..9ee78cb40f 100644
--- a/modules/gui/qt/widgets/qml/GridItem.qml
+++ b/modules/gui/qt/widgets/qml/GridItem.qml
@@ -134,7 +134,7 @@ Rectangle {
VideoQualityLabel {
id: resolutionLabel
- visible: root.isVideo
+ visible: root.resolution !== ""
anchors {
top: cover.top
left: cover.left
@@ -150,7 +150,7 @@ Rectangle {
topMargin: VLCStyle.margin_xxsmall
leftMargin: VLCStyle.margin_xxxsmall
}
- visible: channel.length > 0
+ visible: root.channel !== ""
text: root.channel
color: "limegreen"
}
More information about the vlc-commits
mailing list