-
Notifications
You must be signed in to change notification settings - Fork 0
/
PlayPage.qml
194 lines (190 loc) · 5.61 KB
/
PlayPage.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
import QtQuick 2.0
Item {
id: playpage
anchors.fill: parent
Rectangle{
id: mrect
anchors.fill: parent
color: "black"
Rectangle{
id: art
width: mrect.width/2
height: width
anchors.horizontalCenter: mrect.horizontalCenter
anchors.top: mrect.top
anchors.margins: 100
color: "black"
border.color: "#acee48"
radius: 5
border.width: 4
Image{
id: dfltart
anchors.centerIn: parent
width: parent.width*0.7
height: width
source: "dfltart.png"
fillMode: Image.PreserveAspectFit
}
}
Text{
id: title
anchors.horizontalCenter: mrect.horizontalCenter
anchors.top: art.bottom
anchors.margins: playpage.height*0.05
color: "#acee48"
font.bold: true
text: "Title"
font.pixelSize: playpage.height*0.05
}
Text{
id: artist
anchors.horizontalCenter: mrect.horizontalCenter
anchors.top: title.bottom
anchors.margins: playpage.height*0.05
color: "#acee48"
font.bold: true
text: "Artist"
font.pixelSize: playpage.height*0.05
}
Text{
id: album
anchors.horizontalCenter: mrect.horizontalCenter
anchors.top: artist.bottom
anchors.margins: playpage.height*0.05
color: "#acee48"
font.bold: true
text: "Album"
font.pixelSize: playpage.height*0.05
}
Rectangle{
id: progress
height: 5
width: mrect.width*0.8
anchors.horizontalCenter: mrect.horizontalCenter
anchors.bottom: play.top
anchors.margins: playpage.height*0.05
color: "black"//"#acee48"
border.color: "#acee48"
radius: 2
Rectangle{
id: activeprogress
height: 5
width: mrect.width*0.4
anchors.bottom: progress.bottom
anchors.left: progress.left
color: "#acee48"
radius: 2
}
}
Image {
id: play
width: playpage.width/5
height: width
anchors.bottom: mrect.bottom
anchors.horizontalCenter: mrect.horizontalCenter
source: "play.png"
fillMode: Image.PreserveAspectFit
anchors.margins: 50
Behavior on scale {
PropertyAnimation {
duration: 100
}
}
MouseArea{
anchors.fill: parent
onPressed: play.scale = 1.3
onReleased: {
play.scale = 1.0
play.visible = false
pause.visible = true
}
}
}
Image {
id: pause
width: playpage.width/5
height: width
anchors.bottom: mrect.bottom
anchors.horizontalCenter: mrect.horizontalCenter
source: "pause.png"
visible: false
fillMode: Image.PreserveAspectFit
anchors.margins: 50
Behavior on scale {
PropertyAnimation {
duration: 100
}
}
MouseArea{
anchors.fill: parent
onPressed: pause.scale = 1.3
onReleased: {
pause.scale = 1.0
pause.visible = false
play.visible = true
}
}
}
Image {
id: stop
width: playpage.width/5
height: width
anchors.bottom: mrect.bottom
anchors.horizontalCenter: mrect.horizontalCenter
source: "stop.png"
visible: false
fillMode: Image.PreserveAspectFit
anchors.margins: 50
Behavior on scale {
PropertyAnimation {
duration: 100
}
}
MouseArea{
anchors.fill: parent
onPressed: stop.scale = 1.3
onReleased: stop.scale = 1.0
}
}
Image {
id: bward
width: playpage.width/5
height: width
anchors.bottom: mrect.bottom
anchors.right: play.left
source: "bward.png"
fillMode: Image.PreserveAspectFit
anchors.margins: 50
Behavior on scale {
PropertyAnimation {
duration: 65
}
}
MouseArea{
anchors.fill: parent
onPressed: bward.scale = 1.3
onReleased: bward.scale = 1.0
}
}
Image {
id: fward
width: playpage.width/5
height: width
anchors.bottom: mrect.bottom
anchors.left: play.right
source: "fward.png"
fillMode: Image.PreserveAspectFit
anchors.margins: 50
Behavior on scale {
PropertyAnimation {
duration: 65
}
}
MouseArea{
anchors.fill: parent
onPressed: fward.scale = 1.3
onReleased: fward.scale = 1.0
}
}
}
}