-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtimer.kv
More file actions
60 lines (50 loc) · 1.24 KB
/
timer.kv
File metadata and controls
60 lines (50 loc) · 1.24 KB
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
#:kivy 1.10.1
<RootWidget>:
id: root_widget
cols:1
padding: 0, 10
BoxLayout:
size_hint: None, None
size: root.width, 40
id: box
padding: 5
TextInput:
id: new_task
size_hint_x: .6
Button:
text: 'ADD'
on_press: root.add_task(new_task.text, False, 0)
size_hint_x: .3
<TaskTimerWidget>:
padding: 10, 10
spacing: 5
id: taskT
on_seconds: time.text = self.format(self.seconds)
CheckBox:
id:repeat
size_hint_x: .1
disabled: False
background_checkbox_down: 'images/refresh.png'
background_checkbox_normal: 'images/norefresh.png'
active: root.is_repeatable_flag
on_active: root.change(self.active)
Label:
text: root.label
font_size: 20
size_hint_x: 0.86
Label:
id: time
text: '00:00:00'
font_size: 20
size_hint_x: 0.86
Button:
id: start_button
text: 'START'
on_press: self.parent.parent.stop_all()
on_release: root.start()
size_hint_x: 0.16
Button:
id: done
text: 'DONE'
on_press: root.remove_widget(start_button), root.remove_widget(done), root.stop()
size_hint_x: 0.16