diff --git a/modules/gui/qt/player/qml/Player.qml b/modules/gui/qt/player/qml/Player.qml index 024ec1aaffcc90786ec53257bfbe16b884620477..1e2959c826071c1fd84434a7bc4d8e22b78cb50e 100644 --- a/modules/gui/qt/player/qml/Player.qml +++ b/modules/gui/qt/player/qml/Player.qml @@ -423,27 +423,37 @@ FocusScope { visible: !rootPlayer.hasEmbededVideo Item { - Layout.preferredHeight: rootPlayer.height / 2.7182 - Layout.preferredWidth: height * cover.sar + Layout.preferredHeight: rootPlayer.height / heightConstant + Layout.preferredWidth: cover.paintedWidth Layout.maximumHeight: centerContent.height Layout.alignment: Qt.AlignHCenter + readonly property real heightConstant: 2.7182 + Image { id: cover //source aspect ratio - readonly property real sar: cover.sourceSize.width / cover.sourceSize.height + readonly property real sar: paintedWidth / paintedHeight - anchors.fill: parent + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.horizontalCenter: parent.horizontalCenter source: rootPlayer.coverSource fillMode: Image.PreserveAspectFit - mipmap: height < sourceSize.height * .3 + mipmap: true cache: false asynchronous: true + sourceSize: Qt.size(maximumWidth, maximumHeight) + + readonly property real maximumWidth: MainCtx.screen ? (MainCtx.screen.availableVirtualSize.width * MainCtx.screen.devicePixelRatio) + : 1024 + readonly property real maximumHeight: MainCtx.screen ? (MainCtx.screen.availableVirtualSize.height * MainCtx.screen.devicePixelRatio / parent.heightConstant) + : 1024 } Widgets.CoverShadow { - anchors.fill: cover + anchors.fill: parent source: cover primaryVerticalOffset: VLCStyle.dp(24) primaryRadius: VLCStyle.dp(54)