[vlc-devel] [PATCH 19/21] qml: use the source image aspect ration for the player cover size
Pierre Lamot
pierre at videolabs.io
Wed Aug 7 15:52:25 CEST 2019
---
modules/gui/qt/qml/player/Player.qml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/gui/qt/qml/player/Player.qml b/modules/gui/qt/qml/player/Player.qml
index 005789203f..839e69c9cc 100644
--- a/modules/gui/qt/qml/player/Player.qml
+++ b/modules/gui/qt/qml/player/Player.qml
@@ -46,7 +46,10 @@ Utils.NavigableFocusScope {
: VLCStyle.noArtCover
fillMode: Image.PreserveAspectFit
- width: parent.width / 2
+ //source aspect ratio
+ property real sar: cover.sourceSize.width / cover.sourceSize.height
+
+ width: (parent.height * sar) / 2
height: parent.height / 2
anchors {
horizontalCenter: parent.horizontalCenter
--
2.17.1
More information about the vlc-devel
mailing list