-
Notifications
You must be signed in to change notification settings - Fork 2
/
BottomToolbar.qml
84 lines (79 loc) · 2.06 KB
/
BottomToolbar.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
import QtQuick 2.15
import QtQuick.Window 2.15
import QtQuick.Controls 2.15
import QtMultimedia
Rectangle {
id: bottom_toolbar
z: 10
width: 500
height: 80
color: "#ffffff"
Rectangle {
anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width
height: 3
color: "red"
}
Button {
id: play_button
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
width: 40
height: 40
text: {if (player.playbackState == MediaPlayer.PlayingState) return "stop"
else return "play"}
onReleased: {
if (player.hasAudio) {if (player.playbackState == MediaPlayer.PlayingState) {player.pause()} else {player.play()}}
}
}
Button {
id: previous_button
anchors.right: play_button.left
anchors.rightMargin: 10
anchors.verticalCenter: parent.verticalCenter
width: 40
height: 40
text: "pre"
}
Button {
id: next_button
anchors.left: play_button.right
anchors.leftMargin: 10
anchors.verticalCenter: parent.verticalCenter
width: 40
height: 40
text: "next"
}
Button {
id: playlist_button
anchors.right: parent.right
anchors.rightMargin: 10
anchors.verticalCenter: parent.verticalCenter
width: 40
height: 40
text: "repeat"
}
Button {
id: repeat_method_button
anchors.right: playlist_button.left
anchors.rightMargin: 10
anchors.verticalCenter: parent.verticalCenter
width: 40
height: 40
text: "playlist"
}
Text {
id: song_name_text
anchors.left: parent.left
anchors.leftMargin: 10
anchors.verticalCenter: parent.verticalCenter
text: "Name"
}
Text {
id: artist_name_text
anchors.left: song_name_text.left
anchors.top: song_name_text.bottom
text: "artist"
}
}