Code Review
/
apps
/
mediaplayer.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
app/MediaPlayer.qml: Adjust the playlist size so it arranged correctly
[apps/mediaplayer.git]
/
app
/
MediaPlayer.qml
diff --git
a/app/MediaPlayer.qml
b/app/MediaPlayer.qml
index
089fcd0
..
74fcf2e
100644
(file)
--- a/
app/MediaPlayer.qml
+++ b/
app/MediaPlayer.qml
@@
-14,9
+14,11
@@
* limitations under the License.
*/
* 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 {
import AGL.Demo.Controls 1.0
ApplicationWindow {
@@
-40,7
+42,7
@@
ApplicationWindow {
property string status: "stopped"
function time2str(value) {
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,10
+61,14
@@
ApplicationWindow {
}
if (track) {
}
if (track) {
+ if ('image' in track)
+ return
player.title = track.title
player.album = track.album
player.artist = track.artist
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
if ('index' in track) {
playlistview.currentIndex = track.index
@@
-88,9
+94,10
@@
ApplicationWindow {
Item {
id: container
anchors.centerIn: parent
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
ColumnLayout {
anchors.fill: parent
@@
-251,7
+258,7
@@
ApplicationWindow {
Item {
Layout.fillWidth: true
Layout.fillHeight: true
Item {
Layout.fillWidth: true
Layout.fillHeight: true
- Layout.preferredHeight:
407
+ Layout.preferredHeight:
container.height / 2
ListView {
anchors.fill: parent
ListView {
anchors.fill: parent