File tree Expand file tree Collapse file tree 1 file changed +34
-34
lines changed
examples/demo/kivycatalog Expand file tree Collapse file tree 1 file changed +34
-34
lines changed Original file line number Diff line number Diff line change 8
8
state: ctx.state if hasattr (ctx, " state" ) else " normal"
9
9
10
10
<Container> :
11
- canvas.before:
12
- Color:
13
- rgb: 0 , 0 , 0
14
- Rectangle:
15
- pos: self .pos
16
- size: self .size
11
+ canvas.before:
12
+ Color:
13
+ rgb: 0 , 0 , 0
14
+ Rectangle:
15
+ pos: self .pos
16
+ size: self .size
17
17
18
18
<Catalog> :
19
19
language_box: language_box
37
37
text: ' Welcome'
38
38
values: [screen.name for screen in screen_manager.screens]
39
39
on_text: root.show_kv(* args)
40
+ Widget:
41
+ BoxLayout:
42
+ size_hint: None , 1
43
+ width: ' 150sp'
44
+ Label:
45
+ text: " Auto Reload"
46
+ CheckBox:
47
+ id : chkbx
48
+ active: True
49
+ size_hint_x: 1
50
+ Button:
51
+ size_hint: None , 1
52
+ width: ' 108sp'
53
+ text: ' Render Now'
54
+ on_release: root.change_kv(* args)
40
55
BoxLayout:
41
56
id : reactive_layout
42
57
orientation: ' vertical' if self .width < self .height else ' horizontal'
53
68
mid_size = self .max_size/ 2
54
69
if args[1 ]: self .height = mid_size
55
70
if not args[1 ]: self .width = mid_size
56
- BoxLayout:
57
- id : bl
58
- orientation: " vertical"
59
- ScrollView:
60
- id : kr_scroll
61
- KivyRenderTextInput:
62
- catalog: root
63
- id : language_box
64
- auto_indent: True
65
- lexer: KivyLexer()
66
- size_hint: 1 , None
67
- height: max (kr_scroll.height, self .minimum_height)
68
- font_name: " data/fonts/DroidSansMono.ttf"
69
- valign: " top"
70
- text: " This box will display the kivy language for whatever has been selected"
71
- on_text: root.schedule_reload()
72
- on_cursor: root.schedule_reload()
73
- BoxLayout:
71
+ ScrollView:
72
+ id : kr_scroll
73
+ KivyRenderTextInput:
74
+ catalog: root
75
+ id : language_box
76
+ auto_indent: True
77
+ lexer: KivyLexer()
74
78
size_hint: 1 , None
75
- height: ' 30sp'
76
- BoxLayout:
77
- CheckBox:
78
- id : chkbx
79
- active: True
80
- Label:
81
- text: " Auto Reload"
82
- Button:
83
- text: ' Render Now'
84
- on_release: root.change_kv(* args)
79
+ height: max (kr_scroll.height, self .minimum_height)
80
+ font_name: " data/fonts/DroidSansMono.ttf"
81
+ valign: " top"
82
+ text: " This box will display the kivy language for whatever has been selected"
83
+ on_text: root.schedule_reload()
84
+ on_cursor: root.schedule_reload()
85
85
ScreenManager:
86
86
id : screen_manager
87
87
Screen:
You can’t perform that action at this time.
0 commit comments