-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbaseentry.kv
More file actions
330 lines (302 loc) · 7.09 KB
/
Copy pathbaseentry.kv
File metadata and controls
330 lines (302 loc) · 7.09 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
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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
<BaseEntryScreen>:
BaseEntry:
id: base_entry
#DATE
Label:
id: date_text
text: 'Date'
font_size: 22
text_size: self.size
size_hint: 0.08, 0.05
pos_hint: {'x': 0.2 , 'y': 0.85}
DateCheckBoxLabel:
id: date_checkboxlabel
group: 'date_group'
text: 'Use your device date'
pos_hint: {'x': 0.56 , 'y': 0.85}
size_hint: 0.22,0.06
on_active: base_entry.usedevicedate(self,self.active)
#pos_hint: {'x': 0.6 , 'y': 0.55}
#size_hint: 0.18,0.03
EntryDate:
id: date
readonly: True
text: base_entry.device_date
pHint: 0.35, 0.4
size_hint: 0.6, 0.05
pos_hint: {'center_x': 0.5 , 'y': 0.80}
#AMOUNT
Label:
id: amount_text
text: 'Amount'
font_size: 22
text_size: self.size
size_hint: 0.1, 0.05
pos_hint: {'x': 0.2 , 'y': 0.70}
CustomAccountNumbersTI:
id: amount
#input_filter: "float"
size_hint: 0.6, 0.05
pos_hint: {'center_x': 0.5 , 'y': 0.65}
#BALANCE
Label:
id: balance_text
text: 'Balance'
font_size: 22
text_size: self.size
size_hint: 0.1, 0.05
pos_hint: {'x': 0.2 , 'y': 0.55}
BalanceCheckBoxLabel:
id: balance_checkboxlabel
group: 'balance_group'
text: app.bal_reminder_text
pos_hint: {'x': 0.56 , 'y': 0.55}
font_size: base_entry.bal_reminder_fontsize
size_hint: 0.21,0.06
on_active: base_entry.handle_balremtypebubble()
#pos_hint: {'x': 0.6 , 'y': 0.55}
#size_hint: 0.18,0.03
CustomAccountNumbersTI:
id: balance
#input_filter: "float"
size_hint: 0.6, 0.05
pos_hint: {'center_x': 0.5 , 'y': 0.50}
#COMMENT
Label:
id: comment_text
text: 'Comment (Optional)'
font_size: 22
text_size: self.size
size_hint: 0.25, 0.05
pos_hint: {'x': 0.2 , 'y': 0.40}
TextInput:
id: comment
use_bubble: True
multiline: True
size_hint: 0.6, 0.05
pos_hint: {'center_x': 0.5 , 'y': 0.35}
#QUANTITY
Label:
id: quantity_text
text: 'Quantity (Optional)'
font_size: 22
text_size: self.size
size_hint: 0.25, 0.05
pos_hint: {'x': 0.2 , 'y': 0.25}
CustomAccountNumbersTI:
id: quantity
#input_filter: "float"
size_hint: 0.6, 0.05
pos_hint: {'center_x': 0.5 , 'y': 0.20}
#RECEIVED&SENT
ReceivedCheckBoxLabel:
id: received_checkboxlabel
text: 'Money Received'
group: 'category_group'
font_size: 22
checkbox_color: 1,1,0,1
size_hint: 0.28, 0.095
#size_hint: 0.25, 0.05
pos_hint: {'x': 0.24 , 'y': 0.10}
SentCheckBoxLabel:
id: sent_checkboxlabel
text: 'Money Sent'
group: 'category_group'
font_size: 22
checkbox_color: 1,1,0,1
size_hint: 0.28, 0.095
pos_hint: {'x': 0.56 , 'y': 0.10}
#pos_hint: {'x': 0.62 , 'y': 0.10}
#CANCELBUTTON
Button:
id: baseentry_cancelbutton
text:'Cancel'
size_hint: 0.3, 0.05
pos_hint: {'x': 0.2 , 'y': 0.02}
on_press: base_entry.cancel_entry()
#SAVEBUTTON
Button:
id: baseentry_savebutton
text:'Save'
size_hint: 0.3, 0.05
pos_hint: {'x': 0.5 , 'y': 0.02}
on_press: base_entry.save_entry()
#Custom Widget Checkbox & Label Combo
<CustomCheckBoxLabel>:
cols: 2
text: ''
group: ''
checkbox_size_hint_x: 0.2
label_size_hint_x: 0.8
size_hint:
font_size: 15
checkbox_color: 1,1,1,1
label_color: 1,1,1,1
active: checkbx.active
#checkbox_size_hint_x: 0.3
#label_size_hint_x: 0.7
#size_hint: 0.11, 0.03
#pos_hint: {'x': 0.56 , 'y': 0.55}
on_press: checkbx._do_press()
CheckBox:
id: checkbx
size_hint_x: root.checkbox_size_hint_x
group: root.group
color: root.checkbox_color
Label:
color: root.label_color
text_size: self.size
font_size: root.font_size
text: root.text
size: self.texture_size
size_hint_x: root.label_size_hint_x
#halign: 'right'
valign: 'middle'
<BalReminderModalview>:
size_hint: 0.4,0.4
pos_hint: {'center_x': 0.5, 'y': 0.4}
id: balremmod
#border_color: 0,0,0,1
border_width: 0.1
FloatLayout:
id: balremmodFL
time_spin_text: timespinner.text
size_hint: 0.95, 0.95
pos_hint: {'left': 0 ,'top': 0}
#canvas.before:
#Color:
#rgba: 0,0,1,0.5
#Rectangle:
#size: self.size
#pos: self.pos
Label:
text: 'When will you like to be reminded'
text_size: self.size
pos_hint: {'center_x': 0.5, 'y': 0.9}
size_hint: 0.8, 0.3
Label:
text: 'Date'
text_size: self.size
pos_hint: {'x': 0, 'y': 0.75}
size_hint: 0.2, 0.2
Balrem_date_picker:
id: rem_date_picker
border_width: 0.1
canvas.before:
Color:
rgba: rem_date_picker.foreground_color
Line:
width: rem_date_picker.border_width
rectangle: self.x, self.y, self.width, self.height
text:
hint_text: 'Date'
foreground_color: 0,0,0,1
pos_hint: {'x': 0, 'y': 0.6}
size_hint: 0.4, 0.15
Label:
text: 'Time'
text_size: self.size
pos_hint: {'x': 0.45, 'y': 0.75}
size_hint: 0.3, 0.2
TimeTI:
border_width: 0.1
canvas.before:
Color:
rgba: hh.foreground_color
Line:
width: hh.border_width
rectangle: self.x, self.y, self.width, self.height
id: hh
hint_text:'hh'
font_size: 13
text_size: self.size
foreground_color: 0,0,0,1
pos_hint: {'x': 0.45, 'y': 0.6}
size_hint: 0.10, 0.125
TimeTI:
border_width: 0.1
canvas.before:
Color:
rgba: mins.foreground_color
Line:
width: mins.border_width
rectangle: self.x, self.y, self.width, self.height
id: mins
hint_text: 'mm'
font_size: 13
text_size: self.size
foreground_color: 0,0,0,1
pos_hint: {'x': 0.55, 'y': 0.6}
size_hint: 0.12, 0.125
#valign: 'middle'
CustomSpinner:
border_color: 0,0,0,1
border_width: 0.1
canvas.before:
Color:
rgba: timespinner.border_color
Line:
width: timespinner.border_width
rectangle: self.x, self.y, self.width, self.height
id: timespinner
text: 'GMT'
values: 'AM', 'PM', 'GMT'
pos_hint: {'x': 0.68, 'y': 0.6}
font_size: 13
height: 10
sync_height: True
size_hint: 0.14, 0.09
valign: 'middle'
ErrorAlerts:
id: no_time_input_error_alert
text: 'Error in time input: Enter hour and minutes'
pos_hint:{'x':0.25 ,'y':0.3}
#pos_hint:{'x':0.50 ,'y':0.3}
size_hint: 0.40,0.25
text_size: self.size
font_size: 13
opacity: 0
valign: 'middle'
ErrorAlerts:
id: past_error_alert
text: "Error: You can't set a reminder for the past"
pos_hint:{'x':0.25 ,'y':0.3}
#pos_hint:{'x':0.05 ,'y':0.3}
size_hint: 0.40,0.25
text_size: self.size
font_size: 13
opacity: 0
valign: 'middle'
ErrorAlerts:
id: time_error_alert
text: 'Error in time input: AM & PM are 12hrs time format'
pos_hint:{'x':0.25 ,'y':0.3}
#pos_hint:{'x':0.50 ,'y':0.3}
size_hint: 0.40,0.25
text_size: self.size
font_size: 13
opacity: 0
valign: 'middle'
Button:
id: cancel_reminder
text: 'CANCEL'
size_hint: 0.50, 0.15
pos_hint: {'x': 0, 'y': 0}
on_press: root.cancel_button()
Button:
id: ok_reminder
text: 'SAVE/OK'
size_hint: 0.50, 0.15
pos_hint: {'x': 0.50, 'y': 0}
on_press: root.save_ok_button()
<Balrem_date_picker>:
pHint: 0.3,0.3
<TimeTI>:
border_width: 0.1
<ErrorAlerts>:
canvas.before:
Color:
rgba: 0.8,0.2,0.2,0.5
Rectangle:
size: self.size
pos: self.pos