test-kivy-app/kivy_venv/share/kivy-examples/demo/showcase/data/screens/sliders.kv
2024-09-15 15:12:16 +03:00

56 lines
1.1 KiB
Plaintext

ShowcaseScreen:
name: 'Sliders'
BoxLayout:
size_hint_y: None
height: '48dp'
Label:
text: 'Default'
Slider:
id: s1
Label:
text: '{}'.format(s1.value)
BoxLayout:
size_hint_y: None
height: '48dp'
Label:
text: 'Stepped'
Slider:
id: s2
step: 20
Label:
text: '{}'.format(s2.value)
AnchorLayout:
size_hint_y: None
height: '100dp'
GridLayout:
cols: 2
spacing: '8dp'
size_hint_x: None
width: self.minimum_width
Slider:
size_hint_x: None
width: '48dp'
orientation: 'vertical'
value: s1.value
on_value: s1.value = self.value
Slider:
size_hint_x: None
width: '48dp'
orientation: 'vertical'
step: 20
value: s2.value
on_value: s2.value = self.value