-
Notifications
You must be signed in to change notification settings - Fork 2
/
reminder.kv
512 lines (463 loc) · 13.3 KB
/
reminder.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
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
#:import wd kivy.core.window.Window
#:import CardTransition kivy.uix.screenmanager.CardTransition
#: import screendpi kivy.metrics.MetricsBase
#:import thememanager theming.ThemeManager
<ScreenManagerMain>:
transiton:CardTransition()
<MainScreen>:
canvas:
Color:
rgba:app.background_color
Rectangle:
size:self.size
pos:self.pos
ListBlueprint:
id:ele3
swipable:False
md_bg_color:app.tertiary_color
ListBlueprint:
id:ele2
swipable:False
md_bg_color:app.secondary_color
ListBlueprint:
id:ele1
swipable:True
md_bg_color:app.primary_color
MDFloatingActionButton:
id:action_button
icon: "plus"
on_release: app.plus_button_callback()
root_button_anim: True
md_bg_color:app.accent_color
pos_hint:{'center_x':.85, 'center_y':.08}
theme_text_color: "Custom"
text_color: app.text_color
<ListViewContent>:
height:wd.height
AKToolbarClass:
canvas:
Color:
rgba:app.primary_color
RoundedRectangle:
size:self.size
pos:self.pos
id:top_stuff
orientation:'vertical'
height:self.minimum_height+dp(70)
size_hint:1,None
spacing:dp(20)
FloatLayout:
padding:'20dp',0,'20dp',0
MDIconButton:
id:back_button
icon:'arrow-left'
pos_hint:{'top':.85, 'right':.15}
theme_text_color: "Custom"
text_color: app.text_color
MDIconButton:
id:delete_button
icon:'trash-can-outline'
pos_hint:{'top':.85, 'right':.95}
theme_text_color: "Custom"
text_color: app.text_color
BoxLayout:
padding:'20dp',0,'20dp',0
MDLabel:
id:title
font_name:'Roboto-Black.ttf'
color:app.text_color
font_size:'22sp'
shorten:True
shorten_from:'right'
ListDateBlueprint
id:date_stuff
size_hint:None,None
AKToolbarContent:
id:content
viewclass:"ListViewReminderElement"
height:wd.height
<ListDateBlueprint@RecycleView>:
viewclass: 'ListViewDateCards'
data:[{'date': '21'},{'date': '22'}, {'date': '25'}, {'date': '29'},{'date': '24'},{'date': '2435'}, {'date': '2234'}, {'date': '2123'},]
width:wd.width
height:dp(80)
bar_color:0,0,0,0
bar_inactive_color: 0,0,0,0
RecycleBoxLayout:
id:date_container
padding:'20dp',0,'20dp',0
orientation: 'horizontal'
spacing:'20dp'
size_hint_x: None
width: self.minimum_width
default_size_hint:None,None
default_size:dp(80),dp(80)
<ListViewDateCards>:
date:''
active:False
name:''
MDCard:
md_bg_color:app.accent_color if root.active else app.secondary_color
radius:20,20,20,20
pos_hint:{'center_y':.5}
size_hint:.90,.70
on_release:root.selected()
elevation:13
Label:
id:day_text
text:root.date
halign:'center'
font_name:'Roboto-Medium.ttf'
<ListViewReminderElement>:
text:""
height:self.height if self.disable_height else self.ids.container.height
disable_height:False
color:[]
completed:False
name:
padding:10,10,10,10
spacing:dp(20)
md_bg_color:app.secondary_color
radius:20,20,20,20
parent_pos:root.to_parent(root.pos[0],root.pos[1])
opacity:1
canvas.before:
Color:
rgba:self.color
RoundedRectangle:
size:dp(18),self.height-dp(60)
pos:root.to_parent(root.pos[0],root.pos[1])[0]+dp(10),root.to_parent(root.pos[0],root.pos[1])[1]+dp(10)
RelativeLayout:
id:container
size_hint:None,None
pos:root.pos
width:root.width
height:root.ids.check_box.height+root.ids.label.height
MDCheckbox:
id:check_box
checkbox_icon_normal:"checkbox-blank-circle-outline"
checkbox_icon_down:"checkbox-marked-circle"
size: "30dp", "30dp"
size_hint:None, None
pos:0,root.height-dp(50)
active:root.completed
Label:
id:label
text:root.text
markup:True
font_size:'14sp'
font_name:'Roboto-Medium.ttf'
color:app.text_color
size:self.texture_size
text_size:root.width-dp(60),None
size_hint:None,None
pos:dp(40),root.height-dp(20)-self.height
<ReminderScreen>:
canvas:
Color:
rgba:app.primary_color
Rectangle:
size:self.size
pos:self.pos
MDIconButton:
id:back_button
icon:'arrow-left'
pos_hint:{'center_x':.1, "center_y":.94}
theme_text_color: "Custom"
text_color: app.text_color
MDIconButton:
id:delete_button
icon:'trash-can-outline'
pos_hint:{'center_x':.9, "center_y":.94}
theme_text_color: "Custom"
text_color: app.text_color
ScrollView:
id:scroll
size_hint:1, None
width:wd.width-dp(20)
height:wd.height-dp(80)
pos:self.parent.pos
GridLayout:
id:container
pos:self.parent.pos
size_hint_y:None
height:self.minimum_height+dp(100)
cols:1
padding:30,0,30,0
spacing:'20dp'
<ReminderTitleBlueprint>:
radius:60,60,60,60
md_bg_color: app.accent_color
elevation:20
size_hint:1, None
orientation:'vertical'
padding:50,0,50,0
Label:
id:label
text:'Title'
size: self.texture_size
size_hint:None,None
font_name:'Roboto-Black.ttf'
font_size:'25sp'
color:app.text_color
MDTextField:
id:heading
pos_hint:{'center_x':.5, "center_y":.5}
size_hint:1,None
on_size:root.height = self.height + root.ids.label.height + dp(20)
font_name:'Roboto-Black.ttf'
font_size:'23sp'
multiline:True
color_mode: 'custom'
line_color_focus: app.text_color
current_hint_text_color:app.text_color
<ReminderDescriptionBlueprint>:
radius:40,40,40,40
md_bg_color:app.secondary_color
elevation:20
size_hint:1, None
orientation:'vertical'
padding:50,0,50,0
Label:
id:label
text:'Description:'
size: self.texture_size
size_hint:None,None
font_name:'Roboto-Black.ttf'
font_size:'25sp'
color:app.text_color
MDTextField:
id:description
text:
size_hint:1,None
font_name:'Roboto-Medium.ttf'
font_size:'23sp'
multiline:True
color_mode: 'custom'
line_color_focus: app.text_color
current_hint_text_color:app.text_color
on_size:root.height = self.height + root.ids.label.height +dp(20)
<ReminderTimingBlueprint>:
radius:40,40,40,40
md_bg_color:app.secondary_color
elevation:20
size_hint:1, None
orientation:'vertical'
padding:50,50,50,50
BoxLayout:
id:holder
on_size:root.height = self.minimum_height+100
height:self.minimum_height
spacing:dp(20)
orientation:'vertical'
Label:
id:label1
text:'Reminding You At:'
size: self.texture_size
size_hint:None,None
font_name:'Roboto-Black.ttf'
font_size:'25sp'
color:app.text_color
CustomButton:
id:time_picker
name:'time_picker'
text: 'Time'
BoxLayout:
height:self.minimum_height
spacing:'10dp'
size_hint_y:None
size_hint_x:1
Label:
id:label2
text:'On These:'
font_name:'Roboto-Black.ttf'
font_size:sp(22)
color:app.text_color
size: self.texture_size
size_hint:None,None
pos_hint:{'center_y':.5}
CustomButton:
id:type_picker
name:'type_picker_creator'
text:'None'
MDChipContainer:
id:days_container
type:'choice'
multiple:True
size_hint:None,None
height:self.minimum_height
spacing:dp(5)
pos_hint:{'center_x':.2}
<ReminderDatesBlueprint>:
height:self.minimum_height
size_hint_y:None
spacing:'40dp'
cols:2
MDFillRoundFlatIconButton:
id:date_picker
text: 'Date'
font_size:'22sp'
icon:'calendar-plus'
icon_color:app.accent_color
line_color:app.accent_color
text_color:app.accent_color
md_bg_color:app.primary_color
MDIconButton:
id:remove_button
icon:'minus'
md_bg_color:app.primary_color
theme_text_color: "Custom"
text_color:app.accent_color
<ReminderSaveBlueprint>:
radius:40,40,40,40
md_bg_color:app.background_color
elevation:20
size_hint:1, None
padding:50,0,50,0
orientation:'horizontal'
height:self.minimum_height + 100
spacing:dp(20)
MDFillRoundFlatButton:
id:cancel_button
text:'Cancel'
font_size:'22sp'
md_bg_color:app.primary_color
text_color:app.accent_color
pos_hint:{'center_y':.5}
theme_text_color: "Custom"
MDFillRoundFlatButton:
id:save_button
text:'Save'
font_size:'22sp'
md_bg_color:app.accent_color
text_color:app.primary_color
pos_hint:{'center_y':.5}
theme_text_color: "Custom"
<ListContent>:
pos:self.pos
size:self.size
Label:
id:heading
text:'Reminder'
size: self.texture_size
text_size:(self.size[0]-self.size[0]/3.5, self.height)
pos_hint:{ "center_y":.5}
valign:'top'
halign:'left'
padding_y: "20dp"
font_name:"Roboto-Black.ttf"
font_size:'30sp'
shorten:True
shorten_from:"right"
color:app.text_color
MDRaisedButton:
id:view_button
pos_hint:{'center_x':.80, "center_y":.93}
size_hint:.19,.06
md_bg_color: app.accent_color
text:"View"
elevation:9
font:"Roboto-Regular.ttf"
radius:20,20,20,20
theme_text_color: "Custom"
text_color: app.text_color
GridLayout:
cols:1
id:reminder_container
pos_hint:{"center_x":.5, "center_y":.45}
size_hint:1,.80
padding:(20,20,20,20)
spacing:'20dp'
<ListReminderElement>:
name:
size_hint:1,None
height:self.minimum_height
orientation:'horizontal'
completed:False
padding:dp(10),0,0,0
MDCheckbox:
id:check_box
checkbox_icon_normal:"checkbox-blank-circle-outline"
checkbox_icon_down:"checkbox-marked-circle"
size: "20dp", "20dp"
size_hint:None, None
pos_hint:{'top':1}
active:root.completed
Label:
id:text
text:
size_hint:None,None
size:self.texture_size
padding:("10dp", "0dp")
markup:True
max_lines:4
split_str:' '
text_size: self.parent.width-dp(20), None
font_size:'20sp'
<ListBlueprint>:
drag_rectangle: self.x, self.y, self.width, self.height
drag_timeout: 10000000 if self.swipable else 1
drag_distance: dp(10)
orientation:'vertical'
opacity:1
elevation:15
radius:40,40,40,40
size_hint:None,None
<NewListBlueprint>:
size_hint:1,1
Label:
text:"Create a new List"
size: self.texture_size
pos_hint:{ "center_y":.8}
halign:'left'
font_name:"Roboto-Black.ttf"
font_size:'30sp'
color:app.text_color
MDTextField:
hint_text: 'Enter a new list name'
pos_hint:{ "center_y":.6, 'center_x':.5}
size_hint: 0.8,0.15
color_mode: 'custom'
line_color_focus:app.accent_color
current_hint_text_color:app.text_color
font_name:'Roboto-Black.ttf'
font_size:'25sp'
MDRaisedButton:
id:confirm_button
pos_hint:{'center_x':.75, "center_y":.3}
md_bg_color:app.accent_color
text:"Confirm"
elevation:9
font:"Roboto-Regular.ttf"
radius:20,20,20,20
theme_text_color: "Custom"
text_color: app.text_color
MDRaisedButton:
id:cancel_button
pos_hint:{'center_x':.25, "center_y":.3}
md_bg_color: app.accent_color
text:"Cancel"
elevation:9
font:"Roboto-Regular.ttf"
radius:20,20,20,20
theme_text_color: "Custom"
text_color: app.text_color
<CustomListObject>
IconLeftWidget:
icon: root.left_icon
theme_text_color: "Custom"
text_color: app.accent_color
<CustomButton>
canvas.before:
Color:
rgba:app.primary_color
RoundedRectangle:
radius:20,20,20,20
size:self.width,self.height
pos:self.pos
height:self.texture_size[1]+dp(20)
size_hint:1,None
font_name:'Roboto-Regular.ttf'
font_size:'22sp'
halign:'center'
color:app.accent_color