X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=app%2FMediaPlayer.qml;h=74fcf2ee8689fface40c4f45b3ed112cb392f242;hb=refs%2Ftags%2Fjellyfish%2F9.99.1;hp=92e9f392c6d51438d476080a84e62787afaa31db;hpb=8fe37ce16229c6729958e835c389ac347260388c;p=apps%2Fmediaplayer.git diff --git a/app/MediaPlayer.qml b/app/MediaPlayer.qml index 92e9f39..74fcf2e 100644 --- a/app/MediaPlayer.qml +++ b/app/MediaPlayer.qml @@ -17,6 +17,8 @@ import QtQuick 2.11 import QtQuick.Layouts 1.11 import QtQuick.Controls 2.4 +import QtQuick.Window 2.13 + import AGL.Demo.Controls 1.0 ApplicationWindow { @@ -64,7 +66,9 @@ ApplicationWindow { player.title = track.title player.album = track.album player.artist = track.artist - player.duration = track.duration + + if ('duration' in track) + player.duration = track.duration if ('index' in track) { playlistview.currentIndex = track.index @@ -90,9 +94,10 @@ ApplicationWindow { Item { id: container anchors.centerIn: parent - width: 1080 - height: 1487 - scale: screenInfo.scale_factor() + width: Window.width + height: Window.height + //scale: screenInfo.scale_factor() + scale: 1 ColumnLayout { anchors.fill: parent @@ -253,7 +258,7 @@ ApplicationWindow { Item { Layout.fillWidth: true Layout.fillHeight: true - Layout.preferredHeight: 407 + Layout.preferredHeight: container.height / 2 ListView { anchors.fill: parent