-
Notifications
You must be signed in to change notification settings - Fork 0
/
drink.kv
91 lines (81 loc) · 1.56 KB
/
drink.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
<Button>:
font_size:"30sp"
border: 25,25,25,25
background_color: 0.2, 0.2, 0.2, 1
Manager:
MainScreen:
SetScreen:
<MainScreen>
name: "progress"
goal : goal
quantity : quantity
progress : progress
canvas:
Color:
rgba: 0.05,0.05,0.05,1
Rectangle:
pos: self.pos
size: self.size
GridLayout:
size: root.width,root.height
cols:1
Label:
text: "Today's Progress:"
font_size:"30sp"
Label:
id: progress
text: "0%"
font_size: "70sp"
ProgressBar:
id: goal #########
value: 0
min: 0
max: 7000
Button:
text: "History"
GridLayout:
cols: 4
Label:
font_size:"30sp"
text: "Quantity: "
Label:
text: '0 ml'
color: 0,1,0,1
font_size: "20sp"
Slider:
id: quantity ###########################
orientation: "horizontal"
min: 0
max: 1000
value: 0
step: 50
on_value:label2.text = str(int(self.value))
Label:
text: '1000 ml'
color: 1,0,1,1
font_size: "20sp"
GridLayout:
cols: 3
Button:
text:"Add!"
size : 40,500
on_press: root.pressed()
#root refers to main widget
Button:
text:"Settings"
size : 40,500
on_release:
app.root.current = "settings"
root.manager.transition.direction = "up"
Label:
font_size:"30sp"
id: label2
font_size: "30sp"
color: 0, 1, 1, 1
<SetScreen>
name: "settings"
Button:
text: "Go back"
on_release:
app.root.current = "progress"
root.manager.transition.direction = "down"