[vlc-commits] qml: reduce top margin and better scale center layout of maxplayer
Prince Gupta
git at videolan.org
Fri Nov 6 16:01:01 CET 2020
vlc | branch: master | Prince Gupta <guptaprince8832 at gmail.com> | Wed Oct 21 22:32:52 2020 +0530| [00596ac3e33a1358fedd1484124f9e40e722a2e2] | committer: Pierre Lamot
qml: reduce top margin and better scale center layout of maxplayer
Signed-off-by: Pierre Lamot <pierre at videolabs.io>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=00596ac3e33a1358fedd1484124f9e40e722a2e2
---
modules/gui/qt/player/qml/Player.qml | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/modules/gui/qt/player/qml/Player.qml b/modules/gui/qt/player/qml/Player.qml
index aad85d8c72..c592393a09 100644
--- a/modules/gui/qt/player/qml/Player.qml
+++ b/modules/gui/qt/player/qml/Player.qml
@@ -306,6 +306,7 @@ Widgets.NavigableFocusScope {
Layout.fillWidth: true
Layout.fillHeight: true
+ Layout.topMargin: VLCStyle.margin_xsmall
ColumnLayout {
anchors.fill: parent
@@ -319,11 +320,12 @@ Widgets.NavigableFocusScope {
}
Item {
- Layout.fillWidth: true
Layout.fillHeight: true
+ Layout.preferredHeight: Math.max(Math.min(parent.height, parent.width - VLCStyle.margin_small * 2), 0)
Layout.maximumHeight: rootPlayer.height / 2
Layout.minimumHeight: 1
- Layout.topMargin: albumLabel.Layout.preferredHeight + artistLabel.Layout.preferredHeight + audioControls.width
+ Layout.preferredWidth: height * cover.sar
+ Layout.alignment: Qt.AlignHCenter
Image {
id: cover
@@ -334,10 +336,7 @@ Widgets.NavigableFocusScope {
//source aspect ratio
readonly property real sar: cover.sourceSize.width / cover.sourceSize.height
-
- height: Math.min(parent.height, parent.width - VLCStyle.margin_small * 2)
- width: height * sar
- anchors.centerIn: parent
+ anchors.fill: parent
}
DropShadow {
More information about the vlc-commits
mailing list