-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.kv
156 lines (148 loc) · 5.88 KB
/
main.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#:import NoTransition kivy.uix.screenmanager.NoTransition
#:import lv kivy.uix.listview
#:import la kivy.adapters.listadapter
<ListViewModal>:
list_view: list_view_id
size_hint: None,None
size: 400,400
ListView:
id: list_view_id
size_hint: .8,.8
adapter:
la.ListAdapter(
data=["Item #{0}".format(i) for i in xrange(100)],
selection_mode='single',
allow_empty_selection=False,
cls=lv.ListItemButton)
<LabHelper>:
BoxLayout:
orientation: 'vertical'
canvas.before:
Color:
rgba: 1, 1, 1, 1
Rectangle:
pos: self.pos
size: self.size
BoxLayout:
spacing: 5
padding: '20dp'
BoxLayout:
orientation: 'vertical'
padding: 10
margin: 10
BoxLayout:
spacing: 15
Image:
size_hint: .4, 1
source: './src/assets/Biohack_logo.png'
BoxLayout:
orientation: 'vertical'
Label:
markup: True
bold: True
halign: 'left'
text_size: self.size
text: "[color=7C8FCD]London[/color]"
Label:
markup: True
bold: True
halign: 'left'
valign: 'top'
font_size: 28
text_size: self.size
text: "[color=000000]BIOHACKSPACE[/color]"
Label:
size_hint: (1, .1)
BoxLayout:
orientation: 'vertical'
LabTextInput:
id: user_name
hint_text: "Name"
nick: "k"
border: [10, 10, 10, 10]
multiline: False
size_hint_x: .9
padding: self.size[1]/4
background_active: './src/assets/active.png'
background_normal: './src/assets/back.png'
Label:
size_hint: 1, .5
LabTextInput:
id: substance_name
hint_text: "Substance Name"
multiline: False
border: [10, 10, 10, 10]
size_hint_x: .9
padding: self.size[1]/4
background_active: './src/assets/active.png'
background_normal: './src/assets/back.png'
ScreenManager:
id: sm
transition: NoTransition()
duration: 0
Screen:
name: "checkboxes"
BoxLayout:
orientation: "vertical"
GridLayout:
size_hint: (1, .6)
cols: 2
spacing: -10
CheckBox:
id: dangerous_checkbox
group: 'is_dangerous'
allow_no_selection: False
active: True
background_radio_down: './src/assets/active_checkbox.png'
Label:
markup: True
halign: 'left'
valign: 'center'
text_size: self.size
text: "[color=000000]DANGEROUS[/color]"
CheckBox:
id: non_dangerous_checkbox
allow_no_selection: False
group: 'is_dangerous'
background_radio_down: './src/assets/active_checkbox.png'
Label:
markup: True
halign: 'left'
valign: 'center'
text_size: self.size
text: "[color=000000]NON DANGEROUS[/color]"
Label:
size_hint: (1, .3)
BoxLayout:
size_hint: (1, .3)
padding: 5
margin: 5
spacing: 100
Button:
text: "Clear"
bold: True
background_normal: './src/assets/b.png'
on_release: user_name.text = ''; substance_name.text = ''
Button:
text: "Print"
bold: True
background_normal: './src/assets/b.png'
on_release: root.onPrintReportReleased()
Screen:
name: "suggestions"
BoxLayout:
SuggestionsList:
id: suggestions_list
ScreenManager:
id: screen_manager
transition: NoTransition()
duration: 0
size_hint: 1, .9
Screen:
name: "keyboard_buttons"
KeyboardLayout:
id: keyboard_buttons
Screen:
name: "numeric_keyboard"
NumericKeyboard:
id: numeric_keyboard