This repository has been archived by the owner on Nov 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcostscreen.kv
105 lines (88 loc) · 2.51 KB
/
costscreen.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
<ReceiptCancelButton>:
color_normal: grey if self.unavailable else orange
color_down: grey_down if self.unavailable else orange_down
text: "Cancel"
pos_hint: {"center_y": .5}
<ReceiptBlock>:
size_hint_y: None
height: 65
BoxLayout: # activity name and cancel button
padding: 15
spacing: 28
size_hint: .6, 1
ReceiptCancelButton:
unavailable: root.finished
MainLabel: # activity name
text: root.name
pos_hint: {"center_y": .5}
AlignLabel: # booked day no.
size_hint: .2, 1
text: str(root.day)
halign: "right"
AlignLabel: # activity price
size_hint: .2, 1
text: "${:.2f}".format(root.price)
halign: "right"
<ReceiptLayout>:
orientation: "vertical"
MainScrollView:
BoxLayout:
id: receipt_blocks
orientation: "vertical"
padding: 10
size_hint_y: None
height: self.minimum_height
BoxLayout: # display total price at bottom
size_hint_y: None
height: 65
padding: 10
canvas:
Color:
rgba: grey
Line:
points: 0, self.top, self.width, self.top
AlignLabel:
size_hint: .5, 1
text: "Total"
bold: True
halign: "left"
AlignLabel:
size_hint: .5, 1
text: "${:.2f}".format(root.total)
bold: True
halign: "right"
<CostScreen>:
name: "cost"
BoxLayout:
orientation: "vertical"
MainBanner:
MainHeading:
heading: "Receipt"
HeadingButton:
name: "menu"
on_release: root.manager.current = "menu"
HelpButton:
screen: root.name
BoxLayout: # titles of the receipt table
size_hint_y: None
height: 65
padding: 10
canvas:
Color:
rgba: grey
Line:
points: 0, self.y, self.width, self.y
AlignLabel:
size_hint: .6, 1
text: "Activity"
halign: "left"
AlignLabel:
size_hint: .2, 1
text: "Day"
halign: "right"
AlignLabel:
size_hint: .2, 1
text: "Price"
halign: "right"
ReceiptLayout:
id: receipt_layout