-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdesign.kv
400 lines (327 loc) · 17 KB
/
design.kv
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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
#: include libs/kv/TaskWidget.kv
#: include libs/kv/CustomField.kv
#: import Dialog libs.baseclass.Dialog
#: import DragTask libs.baseclass.TaskWidget
#: import CustomField libs.baseclass.CustomField
#: import PaintWindow libs.baseclass.CustomClasses
#: import get_color_from_hex kivy.utils.get_color_from_hex
#:import C kivy.utils.get_color_from_hex
#: import Window kivy.core.window.Window
#: import images_path kivymd.images_path
<WillDoThis>:
MDBottomNavigation:
panel_color: .35, .35, .45, 1
MDBottomNavigationItem:
name:'home'
text:'home'
icon:'home'
BoxLayout:
spacing:'20dp'
orientation:'vertical'
canvas.before:
Color:
rgba:get_color_from_hex('#EDF8F8')
Rectangle:
size:self.size
pos:self.pos
MDBackdrop:
id:backdrop
left_action_items:[['menu', lambda x: self.open(-Window.height/1.7)]]
title:"WillDoThis"
md_bg_color:1,0,0,1
header_text:""
MDBackdropBackLayer:
FloatLayout:
Screen:
Image:
source:'assets/Images/icon.png'
pos_hint:{"center_y":0.65}
opacity:0.1
BoxLayout:
spacing:dp(30)
canvas.before:
Color:
rgba:(1,0,0,0)
Rectangle:
pos:self.pos
size:self.size
orientation:'vertical'
ScrollView:
MDGridLayout:
adaptive_height: True
cols: 1
padding: "10dp"
spacing: "10dp"
MDBoxLayout:
orientation: "vertical"
adaptive_height: True
padding: "5dp"
spacing: "20dp"
MDLabel:
text: "Change Style"
bold: True
theme_text_color: "Primary"
MDBoxLayout:
id:disabled_controller
size_hint: None, None
adaptive_size: True
spacing: "30dp"
MDCheckbox:
group: "style"
size_hint: None, None
size: "48dp", '48dp'
active:True if app.theme_cls.theme_style == "Light" else False
on_active:
if self.active: app.theme_cls.theme_style = "Light"
root.ids.backdrop.ids._front_layer.md_bg_color = [0,0,0,0]
Label:
text: "Light"
color: app.theme_cls.text_color
MDCheckbox:
group: "style"
size_hint: None, None
size: "48dp", '48dp'
active: True if app.theme_cls.theme_style == "Dark" else False
on_active:
if self.active: app.theme_cls.theme_style = "Dark"
root.ids.backdrop.ids._front_layer.md_bg_color = [0,0,0,0]
Label:
text: "Dark"
color: app.theme_cls.text_color
MDSeparator:
MDBoxLayout:
orientation: "vertical"
adaptive_height: True
padding: "5dp"
spacing: "20dp"
disabled:False
MDLabel:
text: "Smart Theme"
bold: True
theme_text_color: "Primary"
MDBoxLayout:
adaptive_height: True
padding: "5dp"
spacing: "40dp"
MDSwitch:
id:active_theme
size_hint:None, None
size: "48dp", '48dp'
MDLabel:
text:"[color=#00ff00]Active[/color]" if active_theme.active else "[color=#ff0000]Not-Active[/color]"
markup:True
MDSeparator:
MDLabel:
id: label_theme
text: "Current theme: {}".format(app.theme_cls.primary_palette)
bold: True
theme_text_color: "Primary"
size_hint_y: None
height: self.texture_size[1]
OneLineAvatarIconListItem:
on_release:app.show_dialog_change_theme()
text:'Change Theme Color'
IconLeftWidget:
icon:"palette-outline"
MDLabel:
id: label_theme
text: "About Us"
bold: True
theme_text_color: "Primary"
size_hint_y: None
height: self.texture_size[1]
OneLineAvatarIconListItem:
on_release:app.show_license()
text:'License'
IconLeftWidget:
icon:"license"
OneLineAvatarIconListItem:
text:'Developers'
IconLeftWidget:
icon:"dev-to"
Widget:
size_hint_y: None
height: app.theme_cls.standard_increment
MDBackdropFrontLayer:
BoxLayout:
spacing:'40dp'
orientation:'vertical'
BoxLayout:
size_hint_y:None
height:self.minimum_height
padding:[30,0]
spacing:"30dp"
CustomField:
id:note
size_hint_x:0.9
size_hint_y:1
color_active:(0,0,0,1) if app.theme_cls.theme_style == "Light" else (1,1,1,1)
MDFillRoundFlatButton:
size_hint_x:None
size_hint_y:None
height: '50dp'
text:'ADD'
text_color:get_color_from_hex('#002E47')
font_size:25
on_release:root.add_task()
ScrollView:
bar_color:app.theme_cls.primary_color
bar_width:4
id:scroll_view
GridLayout:
size_hint_y: None
cols:1
height:self.minimum_height
DraggableBoxLayout:
size_hint_y:None
id:scroll_area
drag_classes: ['box']
orientation: 'vertical'
height:self.minimum_height
spacing:'30dp'
MDBottomNavigationItem:
name:'paint'
text:'Paint'
icon:'draw'
BoxLayout:
orientation:"vertical"
spacing:dp(10)
BoxLayout:
orientation:"vertical"
size_hint_y:None
height:self.minimum_height
padding:[0,10,0,0]
spacing:dp(10)
MDLabel:
id:quote
text:""
size_hint_y:None
font_size:20
theme_text_color:'Custom'
text_color:(0,0,0,1) if app.theme_cls.theme_style == "Light" else (0.6,0.8,0.8,1)
height:self.texture_size[1]
font_name:'assets/Font/RobotoSlab-SemiBold.ttf' #['H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'Subtitle1', 'Subtitle2', 'Body1', 'Body2', 'Button', 'Caption', 'Overline', 'Icon']
MDLabel:
id:author
text:""
size_hint_y:None
height:self.texture_size[1]
halign:'right'
font_size:20
theme_text_color:"Custom"
text_color:C('#9b59b6')
font_name:'assets/Font/RobotoSlab-SemiBold.ttf'
font_style:'Caption'
BoxLayout:
padding:[20,0,20,0]
orientation:"vertical"
BoxLayout:
padding:[10,10,10,0]
size_hint_y:None
height:self.minimum_height + 30
spacing:dp(Window.width/100)
canvas.before:
Color:
rgba:get_color_from_hex('#98fafa')
RoundedRectangle:
pos:self.pos
size:self.width, self.height
radius:[10,10,0,0]
ColorButton:
background_color: C('#2980b9')
state:'down'
on_release: paint.set_color(self.background_color)
ColorButton:
background_color: C('#27ae60')
on_release: paint.set_color(self.background_color)
ColorButton:
background_color: C('#c0392b')
on_release: paint.set_color(self.background_color)
ColorButton:
background_color: C('#8e44ad')
on_release: paint.set_color(self.background_color)
ColorButton:
background_color: C('#7f8c8d')
on_release: paint.set_color(self.background_color)
ColorButton:
background_color: C('#3498db')
on_release: paint.set_color(self.background_color)
ColorButton:
background_color: C('#f1c40f')
on_release: paint.set_color(self.background_color)
ColorButton:
background_color: C('#e74c3c')
on_release: paint.set_color(self.background_color)
ColorButton:
background_color: C('#9b59b6')
on_release: paint.set_color(self.background_color)
ColorButton:
background_color: C('#ecf0f1')
on_release: paint.set_color(self.background_color)
ColorButton:
background_color: C('#34495e')
on_release: paint.set_color(self.background_color)
PaintWindow:
id:paint
canvas.before:
Color:
rgba:get_color_from_hex('#98fafa')
RoundedRectangle:
pos:self.pos
size:self.size
radius:[0,0,0,0]
BoxLayout:
size_hint_y:None
height:self.minimum_height
spacing:dp(40)
padding:[20,0,20,10]
canvas.before:
Color:
rgba:get_color_from_hex('#98fafa')
RoundedRectangle:
pos:self.pos
size:self.size
radius:[0,0,20,20]
MDFillRoundFlatButton:
text:"Clear"
font_size:20
size_hint_x:0.4
size_hint_y:0.7
on_release:paint.clear_canvas()
MDFloatingActionButton:
icon:'plus'
elevation_normal:10
size_hint_y:None
size_hint_x:None
on_press:print(self)
MDFillRoundFlatButton:
text:"Save"
font_size:20
size_hint_x: 0.4
size_hint_y:0.7
on_release:paint.save()
MDBottomNavigationItem:
name:'about'
text:'About'
icon:'information'
BoxLayout:
orientation:'vertical'
canvas.before:
Color:
rgba:(1,1,1,1) if app.theme_cls.theme_style == "Light" else {0,0,0,1}#get_color_from_hex('#EDF8F8') if
Rectangle:
size:self.size
pos:self.pos
Label:
text:"Icon Index"
halign:'center'
size_hint_y:None
color:(0,0,0,1) if app.theme_cls.theme_style == "Light" else (1,1,1,1)
font_size:50
MDSeparator:
ScrollView:
GridLayout:
id:about
cols:1
size_hint_y:None
height: self.minimum_height