-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathclockHomeView.kv
More file actions
81 lines (79 loc) · 1.98 KB
/
clockHomeView.kv
File metadata and controls
81 lines (79 loc) · 1.98 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#:import math math
[ClockNumber@Label]:
text: str(ctx.i)
pos_hint: {"center_x": 0.5+0.42*math.sin(math.pi/6*(ctx.i-12)), "center_y": 0.5+0.42*math.cos(math.pi/6*(ctx.i-12))}
font_size: self.height/16
<HomeScreen>:
face: face
clockController: clockController
FloatLayout:
id: face
size_hint: None, None
pos_hint: {"center_x":0.75, "center_y":0.75}
size: 0.4*min(root.size), 0.4*min(root.size)
canvas:
Color:
rgb: 0.1, 0.1, 0.1
Ellipse:
size: self.size
pos: self.pos
ClockNumber:
i: 1
ClockNumber:
i: 2
ClockNumber:
i: 3
ClockNumber:
i: 4
ClockNumber:
i: 5
ClockNumber:
i: 6
ClockNumber:
i: 7
ClockNumber:
i: 8
ClockNumber:
i: 9
ClockNumber:
i: 10
ClockNumber:
i: 11
ClockNumber:
i: 12
clockController:
id: clockController
r: min(root.size)*0.5/2
pos_hint: {"center_x":0.75, "center_y":0.75}
wakeAlarmController
FireSleep
WhiteNoise
#RedLight
Button:
text: 'Settings'
height: 15
size_hint: .2, .1
pos_hint: {"x" : .1, 'y' : .7}
on_press: root.manager.current = 'settingScreen'
Button:
text: 'Alarms'
height: 15
size_hint: .2, .1
pos_hint: {"x" : .1, 'y' : .5}
on_press: root.manager.current = 'alarm'
Button:
text: 'Lights'
height: 15
size_hint: .2, .1
pos_hint: {"x" : .1, "y" : .3 }
on_press: root.manager.current = 'colorLights'
Label:
text: 'White Noise'
height: 15
size_hint: .2, .1
pos_hint: {"x" : 0, "y" : .1 }
Label:
text: 'red light'
height: 15
size_hint: .2, .1
pos_hint: {"x" : .5, "y" : .1}