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=85328a916800d0a115a6033a8c672c590920d508;hpb=42928b757f479c4d8b43f885c2b34cbc358d70b2;p=apps%2Fmediaplayer.git diff --git a/app/MediaPlayer.qml b/app/MediaPlayer.qml index 85328a9..74fcf2e 100644 --- a/app/MediaPlayer.qml +++ b/app/MediaPlayer.qml @@ -14,9 +14,11 @@ * limitations under the License. */ -import QtQuick 2.6 -import QtQuick.Layouts 1.1 -import QtQuick.Controls 2.0 +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 { @@ -59,10 +61,14 @@ ApplicationWindow { } if (track) { + if ('image' in track) + return 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 @@ -88,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 @@ -251,7 +258,7 @@ ApplicationWindow { Item { Layout.fillWidth: true Layout.fillHeight: true - Layout.preferredHeight: 407 + Layout.preferredHeight: container.height / 2 ListView { anchors.fill: parent