tests with kivy
This commit is contained in:
39
data/screens/accordions.kv
Normal file
39
data/screens/accordions.kv
Normal file
@@ -0,0 +1,39 @@
|
||||
ShowcaseScreen:
|
||||
name: 'Accordions'
|
||||
|
||||
fullscreen: True
|
||||
|
||||
BoxLayout:
|
||||
size_hint_y: None
|
||||
height: '48dp'
|
||||
|
||||
ToggleButton:
|
||||
id: tbh
|
||||
text: 'Horizontal'
|
||||
group: 'accordion'
|
||||
state: 'down'
|
||||
|
||||
ToggleButton:
|
||||
text: 'Vertical'
|
||||
group: 'accordion'
|
||||
|
||||
Accordion:
|
||||
|
||||
orientation: 'horizontal' if tbh.state == 'down' else 'vertical'
|
||||
|
||||
AccordionItem:
|
||||
title: 'Panel 1'
|
||||
Label:
|
||||
text: 'This is a label fit to the content view'
|
||||
text_size: self.width, None
|
||||
|
||||
AccordionItem:
|
||||
title: 'Panel 2'
|
||||
Button:
|
||||
text: 'A button, what else?'
|
||||
|
||||
AccordionItem:
|
||||
title: 'Panel 3'
|
||||
Label:
|
||||
text: 'This is a label fit to the content view'
|
||||
text_size: self.width, None
|
||||
26
data/screens/buttons.kv
Normal file
26
data/screens/buttons.kv
Normal file
@@ -0,0 +1,26 @@
|
||||
ShowcaseScreen:
|
||||
name: 'Buttons'
|
||||
|
||||
Button:
|
||||
size_hint_y: None
|
||||
height: '48dp'
|
||||
text: 'Button normal'
|
||||
|
||||
Button:
|
||||
size_hint_y: None
|
||||
height: '48dp'
|
||||
text: 'Button down'
|
||||
state: 'down'
|
||||
|
||||
Button:
|
||||
size_hint_y: None
|
||||
height: '48dp'
|
||||
text: 'Button disabled'
|
||||
disabled: True
|
||||
|
||||
Button:
|
||||
size_hint_y: None
|
||||
height: '48dp'
|
||||
text: 'Button down disabled'
|
||||
state: 'down'
|
||||
disabled: True
|
||||
Reference in New Issue
Block a user