-
Notifications
You must be signed in to change notification settings - Fork 0
/
SettingsScreen.kv
226 lines (200 loc) · 7.26 KB
/
SettingsScreen.kv
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# File name: SettingsScreen.kv
#: import CheckBox kivy.uix.checkbox
<SongpoolControlRow>:
spacing: 25
size_hint_y: None
size_hint_x: None
height: 50
width: 500
Label:
text: "{:} - {:}".format(root.artist, root.title)
font_name: 'Bungee'
font_size: 18
color: 0.3, 0.3, 0.3, 1.0
CheckBox:
id: CheckBox
text: 'CheckBox'
active: root.available
on_active: root.set_checkbox(self.active)
color: 0.1, 0.1, 0.1, 1.0
<SettingsScreen@Screen>:
name: 'settings_screen'
#=======================================================
# Define the screen background
#=======================================================
canvas.before:
Color:
rgba: C('efd593ff')
Rectangle:
pos: self.pos
size: self.size
BoxLayout:
orientation: 'horizontal'
minimum_width: 300
size_hint: 1, 1
padding: [5,5,5,5]
#===================================================
# Left:
#===================================================
BoxLayout:
orientation: 'vertical'
size: 290, 470
size_hint: None, None
spacing: 20
#===============================================
# Back-to-player button
#===============================================
Button:
text: 'Go Back'
font_name: 'Bungee'
font_size: 20
bold: True
color: C('fbf5e7ff')
on_press: root.show_main_screen()
background_normal: 'img/button.png'
background_down: 'img/button.png'
size_hint: None, None
size: 300, 50
#===============================================
# Next-song button
#===============================================
Button:
id: next_song_button
text: 'Next Song'
font_name: 'Bungee'
font_size: 20
bold: True
color: C('fbf5e7ff')
on_press: root.main_screen.play_next_song()
background_normal: 'img/button.png'
background_down: 'img/button.png'
size_hint: None, None
size: 300, 50
#===============================================
# Exit button
#===============================================
Button:
id: exit_button
text: 'Close app'
font_name: 'Bungee'
font_size: 20
bold: True
color: C('fbf5e7ff')
on_press: root.main_screen.close_app()
background_normal: 'img/button.png'
background_down: 'img/button.png'
size_hint: None, None
size: 300, 50
#===============================================
# Volume slider
#===============================================
BoxLayout:
orientation: 'horizontal'
Label:
text: 'Volume'
font_name: 'Bungee'
font_size: 20
bold: True
color: 0.3, 0.3, 0.3, 1.0
Slider:
id: volume_slider
min: 0
max: 1
step: 0.05
value: 1.0
orientation: 'horizontal'
#===============================================
# Song-Fading slider
#===============================================
BoxLayout:
orientation: 'horizontal'
Label:
text: 'Fading'
font_name: 'Bungee'
font_size: 20
bold: True
color: 0.3, 0.3, 0.3, 1.0
Slider:
id: fading_slider
min: 0.05
max: 0.95
step: 0.1
value: 0.95
orientation: 'horizontal'
#===================================================
# Right: Song category checkboxes
#===================================================
BoxLayout:
orientation: 'vertical'
BoxLayout:
orientation: 'horizontal'
Label:
text: "Playlist #1"
size_hint_x: .80
font_name: 'Bungee'
font_size: 20
color: 0.3, 0.3, 0.3, 1.0
CheckBox:
active: True
color: C('301e0f')
on_active: root.set_song_category(self.active, 0)
size_hint_x: .20
BoxLayout:
orientation: 'horizontal'
Label:
text: "Playlist #2"
size_hint_x: .80
font_name: 'Bungee'
font_size: 20
color: 0.3, 0.3, 0.3, 1.0
CheckBox:
active: True
color: C('301e0f')
on_active: root.set_song_category(self.active, 1)
size_hint_x: .20
BoxLayout:
orientation: 'horizontal'
Label:
text: "Playlist #3"
size_hint_x: .80
font_name: 'Bungee'
font_size: 20
color: 0.3, 0.3, 0.3, 1.0
CheckBox:
active: False
color: C('301e0f')
on_active: root.set_song_category(self.active, 2)
size_hint_x: .20
BoxLayout:
orientation: 'horizontal'
Label:
text: "Playlist #4"
size_hint_x: .80
font_name: 'Bungee'
font_size: 20
color: 0.3, 0.3, 0.3, 1.0
CheckBox:
active: False
color: C('301e0f')
on_active: root.set_song_category(self.active, 3)
size_hint_x: .20
#===============================================
# SongpoolControl - list of all available songs
# and corresponding checkbox, if song is active
#===============================================
BoxLayout:
size_hint: None, None
size: 460, 300
pos_hint: {'center_x':0.5, 'center_y':0.7}
RecycleView:
do_scroll_x: False
do_scroll_y: True
bar_width: 20
bar_margin: -10
scroll_type: ['content','bars']
SongpoolControl:
id: songpool_control
orientation: "vertical"
size_hint_y: None
height: self.minimum_height
padding: 50, 50, 50, 50