-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.yaml
197 lines (162 loc) · 6.66 KB
/
main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
ScreenManager:
id: screen_manager
MainScreen:
id: main_screen
ScreenOne:
id: screen_one
ScreenTwo:
id: screen_two
<MainScreen>:
name: "main_screen"
MDBoxLayout:
orientation: "vertical"
MDTopAppBar:
id: top_bar
title: "KivyMD Launcher"
specific_text_color: "white"
size_hint_y: None
elevation: 2
left_action_items: [['menu', lambda x: nav_drawer.set_state("open")]]
right_action_items: [["dots-vertical", lambda x: app.right_dots()]]
pos_hint: {"top": 1}
BoxLayout:
orientation: "vertical"
size_hint_y: 0.5
ScrollView:
id: scroll_view
BoxLayout:
id: app_list
orientation: "vertical"
size_hint_y: None
height: self.minimum_height
padding: dp(8)
spacing: dp(8)
TextInput:
id: debug_console
text: ""
readonly: True
background_color: 0, 0, 0, 1
foreground_color: 0, 1, 0, 1
size_hint_y: 0.5
multiline: True
<ScreenOne>:
name: "screen_one"
BoxLayout:
orientation: "vertical"
MDTopAppBar:
id: top_bar
title: "Add Kivy Application"
specific_text_color: "white"
size_hint_y: None
left_action_items: [["arrow-left", lambda x: app.switch_screen('main_screen')]]
right_action_items: [["dots-vertical", lambda x: app.right_dots()]]
pos_hint: {"top": 1}
ScrollView:
MDBoxLayout:
id: form_box
orientation: "vertical"
spacing: 10
padding: 20, 10
size_hint_y: None
height: self.minimum_height
MDCard:
id: form_data
orientation: 'vertical'
size_hint: 0.96, None
height: self.minimum_height
padding: dp(20)
spacing: dp(20)
elevation: 0
radius: [25, 25, 25, 25]
canvas.before:
Color:
rgba: app.theme_cls.primary_color
RoundedRectangle:
pos: self.pos
size: self.size
radius: [25, 25, 25, 25]
Color:
rgba: app.theme_cls.primary_color
Line:
rounded_rectangle: self.x, self.y, self.width, self.height, 25, 25, 25, 25
width: 2
MDLabel:
text: "Add Kivy Application"
theme_text_color: "Secondary"
font_style: "H5"
MDTextField:
id: app_src
text: ""
hint_text: "Application Source Path: select your main.py"
readonly: False
MDRoundFlatIconButton:
text: "Select Directory"
icon: "folder"
pos_hint: {"center_x": .5}
on_release: app.file_manager_open()
MDTextField:
id: app_name
text: ""
hint_text: "App Name"
readonly: False
MDBoxLayout:
orientation: 'horizontal'
spacing: 20
padding: 10, 10, 10, 10
size_hint_y: None
height: self.minimum_height
MDRoundFlatIconButton:
text: "cancel "
pos_hint: {"center_x": 1}
on_release: app.switch_screen('main_screen'); app.app_clear()
MDRoundFlatIconButton:
text: "clear "
pos_hint: {"center_x": 1}
on_release: app.app_clear()
MDRoundFlatIconButton:
text: "submit "
pos_hint: {"center_x": 1}
on_release: app.on_submit(); app.load_apps()
MDCard:
id: info_card
opacity: 0
orientation: 'vertical'
size_hint: 0.96, None
height: dp(200)
padding: dp(20)
spacing: dp(20)
radius: [25, 25, 25, 25]
canvas.before:
Color:
rgba: app.theme_cls.primary_color
RoundedRectangle:
pos: self.pos
size: self.size
radius: [25, 25, 25, 25]
Color:
rgba: app.theme_cls.primary_color
Line:
rounded_rectangle: self.x, self.y, self.width, self.height, 25, 25, 25, 25
width: 2
MDLabel:
id: info_message
text_color: 1, 1, 1, 1
text: ""
pos_hint: {"top": 1}
<ScreenTwo>:
name: "screen_two"
MDBoxLayout:
orientation: "vertical"
MDTopAppBar:
id: top_bar
title: "Screen Two"
specific_text_color: "white"
size_hint_y: None
elevation: 2
left_action_items: [['menu', lambda x: nav_drawer.set_state("open")]]
right_action_items: [["dots-vertical", lambda x: app.right_dots()]]
pos_hint: {"top": 1}
MDLabel:
text: "Screen Two"
halign: "center"
pos_hint: {"center_y": 0.5}