60 lines
1.3 KiB
Plaintext
60 lines
1.3 KiB
Plaintext
#:kivy 1.0
|
|
#:import kivy kivy
|
|
|
|
<AudioBackground>:
|
|
orientation: 'vertical'
|
|
canvas:
|
|
Color:
|
|
rgb: 1, 1, 1
|
|
Rectangle:
|
|
source: 'data/images/background.jpg'
|
|
size: self.size
|
|
|
|
BoxLayout:
|
|
padding: 10
|
|
spacing: 10
|
|
size_hint: 1, None
|
|
pos_hint: {'top': 1}
|
|
height: 44
|
|
Image:
|
|
size_hint: None, None
|
|
size: 24, 24
|
|
source: 'data/logo/kivy-icon-24.png'
|
|
Label:
|
|
height: 24
|
|
text_size: self.size
|
|
color: (1, 1, 1, .8)
|
|
text: 'Kivy %s - Audio sample' % kivy.__version__
|
|
valign: 'middle'
|
|
|
|
Label:
|
|
text: 'Audio example'
|
|
font_size: 32
|
|
size_hint_y: None
|
|
|
|
BoxLayout:
|
|
Slider:
|
|
min: 0.0
|
|
max: 1.0
|
|
value: 1.0
|
|
on_value: app.set_volume(self.value)
|
|
orientation: "vertical"
|
|
size_hint_x: None
|
|
width: "48dp"
|
|
|
|
StackLayout:
|
|
id: sl
|
|
|
|
Button:
|
|
text: 'Stop and release all audio'
|
|
size_hint_y: None
|
|
height: '50sp'
|
|
on_press: app.release_audio()
|
|
|
|
<AudioButton>:
|
|
size_hint: None,0.333
|
|
width: self.height
|
|
text_size: self.size
|
|
font_size: '12sp'
|
|
valign: 'middle'
|