X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=app%2FMediaPlayer.qml;h=4138759812cedc1b4a5297f7c0d40cf2aebccf39;hb=9caa297dd63843394b3fa5ea5d16d7609a7fadca;hp=089fcd01e4c9ecb73590233df4ddeffdc6e24502;hpb=3bb70f35d407595417ee86b24041b2d8bfca4d83;p=apps%2Fmediaplayer.git diff --git a/app/MediaPlayer.qml b/app/MediaPlayer.qml index 089fcd0..4138759 100644 --- a/app/MediaPlayer.qml +++ b/app/MediaPlayer.qml @@ -14,9 +14,12 @@ * 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.11 + import AGL.Demo.Controls 1.0 ApplicationWindow { @@ -40,7 +43,7 @@ ApplicationWindow { property string status: "stopped" function time2str(value) { - return Qt.formatTime(new Date(value), 'mm:ss') + return Qt.formatTime(new Date(value), (value > 3600000) ? 'hh:mm:ss' : 'mm:ss') } } @@ -59,6 +62,8 @@ ApplicationWindow { } if (track) { + if ('image' in track) + return player.title = track.title player.album = track.album player.artist = track.artist @@ -88,9 +93,10 @@ ApplicationWindow { Item { id: container anchors.centerIn: parent - width: 1080 - height: 1487 - scale: screenInfo.scale_factor() + width: Screen.width + height: Screen.height + //scale: screenInfo.scale_factor() + scale: 1 ColumnLayout { anchors.fill: parent