-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMyPlaylistView.qml
62 lines (60 loc) · 1.62 KB
/
MyPlaylistView.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import QtQuick 6.2
import QtQuick.Window 6.2
import QtQuick.Controls 6.2
import Qt5Compat.GraphicalEffects
ListView {
id: myPlaylistView
width: parent.width
height: model.count * 50
interactive: false
spacing: 2
delegate: MouseArea {
id: mouseArea
width: parent.width
height: 50
onReleased: {
if (stackView.currentItem.objectName === "playlistPage") {
stackView.replace(playlistPage,{"id": id})
}
else {
stackView.push(playlistPage,{"id": id})
}
}
Material_Image {
id: cover
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
width: 45
height: 45
source: coverUrl
anchors.leftMargin: 12
elevation: 2
radius: 5
}
Text {
anchors.left: cover.right
verticalAlignment: Text.AlignBottom
lineHeight: 0.8
anchors.leftMargin: 10
width: parent.width - 75
height: 35
wrapMode: Text.WordWrap
font.pointSize: 11
text: name
elide: Text.ElideRight
clip: true
color: "#000000"
}
Text {
anchors.left: cover.right
y: 38
verticalAlignment: Text.AlignBottom
font.pointSize: 8
anchors.leftMargin: 10
width: parent.width - 75
height: 10
color: "#9f000000"
text: trackCount.toString() + qsTr("首")
}
}
}