| 1 |
#:kivy 1.8.0 |
| 2 |
#:import KivyLexer kivy.extras.highlight.KivyLexer |
| 3 |
#:import Factory kivy.factory.Factory |
| 4 |
# This is a Comment |
| 5 |
<ActionSpinnerOptions@SpinnerOption> |
| 6 |
background_color: .4, .4, .4, 1 |
| 7 |
|
| 8 |
<ActionSpinner@Spinner+ActionItem> |
| 9 |
canvas.before: |
| 10 |
Color: |
| 11 |
rgba: 0.128, 0.128, 0.128, 1 |
| 12 |
Rectangle: |
| 13 |
size: self.size |
| 14 |
pos: self.pos |
| 15 |
border: 27, 20, 12, 12 |
| 16 |
background_normal: 'atlas://data/images/defaulttheme/action_group' |
| 17 |
option_cls: Factory.ActionSpinnerOptions |
| 18 |
|
| 19 |
<ActionDropdown>: |
| 20 |
on_size: self.width = '220dp' |
| 21 |
|
| 22 |
<ShowcaseScreen>: |
| 23 |
# This is a Comment |
| 24 |
ScrollView: |
| 25 |
do_scroll_x: False |
| 26 |
do_scroll_y: False if root.fullscreen else (content.height > root.height - dp(16)) |
| 27 |
AnchorLayout: |
| 28 |
size_hint_y: None |
| 29 |
height: root.height if root.fullscreen else max(root.height, content.height) |
| 30 |
GridLayout: |
| 31 |
id: content |
| 32 |
cols: 1 |
| 33 |
spacing: '8dp' |
| 34 |
padding: '8dp' |
| 35 |
size_hint: (1, 1) if root.fullscreen else (.8, None) |
| 36 |
height: self.height if root.fullscreen else self.minimum_height |
| 37 |
|
| 38 |
|
| 39 |
BoxLayout: |
| 40 |
orientation: 'vertical' |
| 41 |
|
| 42 |
canvas.before: |
| 43 |
Color: |
| 44 |
rgb: .6, .6, .6 |
| 45 |
Rectangle: |
| 46 |
size: self.size |
| 47 |
source: 'data/background.png' |
| 48 |
|
| 49 |
ActionBar: |
| 50 |
|
| 51 |
ActionView: |
| 52 |
id: av |
| 53 |
ActionPrevious: |
| 54 |
with_previous: (False if sm.current_screen.name == 'button' else True) if sm.current_screen else False |
| 55 |
title: 'Showcase' + ('' if not app.current_title else ' - {}'.format(app.current_title)) |
| 56 |
on_release: app.go_hierarchy_previous() |
| 57 |
|
| 58 |
ActionSpinner: |
| 59 |
id: spnr |
| 60 |
important: True |
| 61 |
text: 'Jump to Screen' |
| 62 |
values: app.screen_names |
| 63 |
on_text: |
| 64 |
if sm.current != args[1]:\ |
| 65 |
idx = app.screen_names.index(args[1]);\ |
| 66 |
app.go_screen(idx) |
| 67 |
ActionToggleButton: |
| 68 |
text: 'Toggle sourcecode' |
| 69 |
icon: 'data/icons/bug.png' |
| 70 |
on_release: app.toggle_source_code() |
| 71 |
ActionButton: |
| 72 |
text: 'Previous screen' |
| 73 |
icon: 'data/icons/chevron-left.png' |
| 74 |
on_release: app.go_previous_screen() |
| 75 |
|
| 76 |
ActionButton: |
| 77 |
text: 'Next screen' |
| 78 |
icon: 'data/icons/chevron-right.png' |
| 79 |
on_release: app.go_next_screen() |
| 80 |
important: True |
| 81 |
|
| 82 |
ScrollView: |
| 83 |
id: sv |
| 84 |
size_hint_y: None |
| 85 |
height: 0 |
| 86 |
|
| 87 |
CodeInput: |
| 88 |
id: sourcecode |
| 89 |
lexer: KivyLexer() |
| 90 |
text: app.sourcecode |
| 91 |
readonly: True |
| 92 |
size_hint_y: None |
| 93 |
font_size: '12sp' |
| 94 |
height: self.minimum_height |
| 95 |
|
| 96 |
ScreenManager: |
| 97 |
id: sm |
| 98 |
on_current_screen: |
| 99 |
spnr.text = args[1].name |
| 100 |
idx = app.screen_names.index(args[1].name) |
| 101 |
if idx > -1: app.hierarchy.append(idx) |