-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpycalc.kv
More file actions
85 lines (78 loc) · 1.78 KB
/
pycalc.kv
File metadata and controls
85 lines (78 loc) · 1.78 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
82
83
84
85
#:set PAD 10
BoxLayout:
orientation: "vertical"
padding: PAD
spacing: PAD
TextInput:
id: display
text: ""
readonly: True
font_size: 32
size_hint_y: 0.2
BoxLayout:
spacing: PAD
Button:
text: "C"
on_release: app.clear_expr()
Button:
text: "("
on_release: app.tap("(")
Button:
text: ")"
on_release: app.tap(")")
Button:
text: "/"
on_release: app.tap("/")
BoxLayout:
spacing: PAD
Button:
text: "7"
on_release: app.tap("7")
Button:
text: "8"
on_release: app.tap("8")
Button:
text: "9"
on_release: app.tap("9")
Button:
text: "*"
on_release: app.tap("*")
BoxLayout:
spacing: PAD
Button:
text: "4"
on_release: app.tap("4")
Button:
text: "5"
on_release: app.tap("5")
Button:
text: "6"
on_release: app.tap("6")
Button:
text: "-"
on_release: app.tap("-")
BoxLayout:
spacing: PAD
Button:
text: "1"
on_release: app.tap("1")
Button:
text: "2"
on_release: app.tap("2")
Button:
text: "3"
on_release: app.tap("3")
Button:
text: "+"
on_release: app.tap("+")
BoxLayout:
spacing: PAD
Button:
text: "0"
on_release: app.tap("0")
Button:
text: "."
on_release: app.tap(".")
Button:
text: "="
on_release: app.calculate()