app/MediaPlayer: Do not hard-code the window size
[apps/mediaplayer.git] / app / MediaPlayer.qml
index f6beafd..cdd9368 100644 (file)
  * 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 {
@@ -64,7 +67,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 +95,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