-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmorphodict.kv
410 lines (388 loc) · 18.2 KB
/
morphodict.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
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
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
#: import MDLabel kivymd.uix.label.MDLabel
#: import get_color_from_hex kivy.utils.get_color_from_hex
#: import MAGENTA_THEME_COLOR shared.generalData.MAGENTA_THEME_COLOR
MainScreen:
<ParadigmLabelContent>:
id: paradigm_label_content
size_hint_y: None
height: self.minimum_height
canvas.before:
Color:
rgba: 1, 1, 1, 1
Rectangle:
pos: self.pos
size: self.size
Color:
rgba: 0.5450, 0, 0, 1
Line:
width: 1.5
rectangle: self.x, self.y, self.width, self.height
<SoundLoadSpinner>:
size_hint: None, None
size: "15dp", "15dp"
palette: [255/256, 204/256, 92/256, 1], [101/256, 30/256, 62/256, 1], [133/256, 30/256, 62/256, 1]
active: app.spinner2_active
<ResultWidget>:
id: res
orientation: 'vertical'
padding: "5dp"
canvas.before:
Color:
rgba: 1, 1, 1, 1
Rectangle:
pos: self.pos
size: self.size
Color:
rgba: 0.5450, 0, 0, 1
Line:
width: 1
rectangle: self.x, self.y, self.width, self.height
<ResultView>:
viewclass: 'ResultWidget'
RecycleBoxLayout:
spacing: "22dp"
default_size: None, None
default_size_hint: 1, None
default_pos_hint: {'x': 0.13}
size_hint_y: None
size_hint_x: 0.8
pos_hint: {'x': 0.13}
height: self.minimum_height
orientation: 'vertical'
# canvas.before:
# Color:
# rgba: (1, 0, 0, 1)
# Rectangle:
# pos: self.pos
# size: self.size
<LabelSettingsItem>:
text: root.text
theme_text_color: "Custom"
text_color: (1, 0, 0, 1)
<MainScreen@MDScreen>:
MDNavigationLayout:
WindowManager:
id: screen_manager
HomeScreen:
name: "Home"
MainLayout:
id: mainBoxLayout
orientation: "vertical"
# padding: "10dp"
# spacing: "10dp"
MDTopAppBar:
title: "Search"
elevation: 5
pos_hint: {"top": 1}
md_bg_color: get_color_from_hex("#8B0000")
specific_text_color: get_color_from_hex("#F5F2D0")
left_action_items:
[['menu', lambda x: drawerNavigator.set_state("open")]]
MainLoaderSpinner:
id: main_loader_spinner
size_hint: None, None
size: dp(20), dp(20)
pos_hint: {'center_x': .5, 'center_y': .5}
active: app.main_loader_active
Image:
source: 'images/itwewina-with-text.png'
size: "175dp", "400dp"
size_hint: None, 0.2
pos_hint: {'x': 0.08}
MDTextField:
id: input_word
hint_text: "Search in Cree or English"
mode: 'rectangle'
size_hint: 0.8, None
pos_hint: {"center_x": 0.5}
height: "35dp"
on_text_validate:
altlab_develop_text_label.height = "0dp"
altlab_develop_text_label.text = ""
altlab_develop_text_label.size_hint_y = None
altlab_develop_text_label.opacity = 0
altlab_develop_text_label.disabled = True
root.ids.mainBoxLayout.onSubmitWord(self)
font_name: 'bjcrus.ttf'
color_mode: 'custom'
line_color_focus: get_color_from_hex(MAGENTA_THEME_COLOR)
hint_text_color_focus: get_color_from_hex(MAGENTA_THEME_COLOR)
text_color_focus: get_color_from_hex(MAGENTA_THEME_COLOR)
Label:
text:''
size_hint: 1, 0.05
Label:
id: altlab_develop_text_label
text: "This is an intelligent dictionary for Plains Cree, made by the [color=0000ff][ref=https://altlab.ualberta.ca][u]Alberta Language Technology Lab (ALTLab)[/u].[/ref][/color]"
color: (0, 0, 0, 1)
text_size: self.width, None
markup: True
on_ref_press:
import webbrowser
webbrowser.open("https://altlab.ualberta.ca")
halign: 'center'
valign: 'center'
size_hint: 0.8, None
height: self.texture_size[1] + 20
width: self.texture_size[0] + 20
font_size: "16dp"
pos_hint: {"x": 0.1}
canvas.before:
Color:
rgba: (1, 1, 1, 1)
Rectangle:
pos: self.pos
size: self.size
Label:
text:''
size_hint: 1, 0.05
ResultView:
id: result_list_main
do_scroll_x: False
do_scroll_y: True
Label:
text: ""
size_hint: 1, None
height: "1dp"
ResultScreen:
name: "Result"
ResultPageMainLayout:
orientation: 'vertical'
MDTopAppBar:
title: "Results"
elevation: 5
pos_hint: {"top": 1}
md_bg_color: get_color_from_hex("#8B0000")
specific_text_color: get_color_from_hex("#F5F2D0")
left_action_items:
[['arrow-left', lambda x: app.root.ids.screen_manager.switch_back_home_screen()]]
right_action_items: [["dots-vertical", lambda x: drawerNavigator.set_state("open")]]
Image:
source: 'images/itwewina-with-text.png'
size: "175dp", "250dp"
size_hint: None, 0.2
pos_hint: {'x': 0.01}
MDBoxLayout:
padding: "10dp"
ScrollView:
id: specific_result_page_scrollview
SpecificResultMainList:
id: specificResultPageMainListLayout
LegendOfAbbrPage:
name: "Legend"
LegendPageMainLayout:
orientation: 'vertical'
MDTopAppBar:
title: "Legend of Abbreviations"
elevation: 5
pos_hint: {"top": 1}
md_bg_color: get_color_from_hex("#8B0000")
specific_text_color: get_color_from_hex("#F5F2D0")
left_action_items:
[['arrow-left', lambda x: app.root.ids.screen_manager.switch_back_home_screen()]]
MDBoxLayout:
padding: "20dp"
orientation: 'vertical'
MDLabel:
text: ""
size_hint: 1, 0.01
MDLabel:
text: "Legend of abbreviations and terms"
bold: True
size_hint: 1, None
height: self.texture_size[1] + 10
font_size: 28
ScrollView:
MDList:
MDLabel:
text: app.legend_of_abbr_text
markup: True
font_size: 13
valign: 'top'
text_size: self.size
size_hint: 1, None
height: self.texture_size[1]
on_ref_press: app.on_legend_ref_press(*args)
ContactUsScreen:
name: "Contact"
ContactPageMainLayout:
orientation: 'vertical'
MDTopAppBar:
title: "Contact us"
elevation: 5
pos_hint: {"top": 1}
md_bg_color: get_color_from_hex("#8B0000")
specific_text_color: get_color_from_hex("#F5F2D0")
left_action_items:
[['arrow-left', lambda x: app.root.ids.screen_manager.switch_back_home_screen()]]
MDBoxLayout:
padding: "20dp"
orientation: 'vertical'
MDLabel:
text: ""
size_hint: 1, 0.01
MDLabel:
text: "Contact us"
bold: True
size_hint: 1, None
height: self.texture_size[1] + 10
font_size: 28
ScrollView:
MDList:
MDLabel:
text: app.contact_us_text
markup: True
font_size: 13
valign: 'top'
text_size: self.size
size_hint: 1, None
height: self.texture_size[1]
on_ref_press: app.on_contact_ref_press(*args)
AboutScreen:
name: "About"
AboutPageMainLayout:
orientation: 'vertical'
MDTopAppBar:
title: "About"
elevation: 5
pos_hint: {"top": 1}
md_bg_color: get_color_from_hex("#8B0000")
specific_text_color: get_color_from_hex("#F5F2D0")
left_action_items:
[['arrow-left', lambda x: app.root.ids.screen_manager.switch_back_home_screen()]]
MDBoxLayout:
padding: "20dp"
orientation: 'vertical'
MDLabel:
text: ""
size_hint: 1, 0.01
ScrollView:
id: about_page_scroll_view
AboutMDList:
MDLabel:
text: "Source Materials"
bold: True
size_hint: 1, None
height: self.texture_size[1] + 10
font_size: 28
MDLabel:
text: app.about_text_source_material
markup: True
font_size: 13
valign: 'top'
text_size: self.size
size_hint: 1, None
height: self.texture_size[1]
on_ref_press: app.on_about_ref_press(*args)
MDLabel:
text: "Credits"
bold: True
size_hint: 1, None
height: self.texture_size[1] + 10
font_size: 28
MDLabel:
text: app.about_text_credit
markup: True
font_size: 13
valign: 'top'
text_size: self.size
size_hint: 1, None
height: self.texture_size[1]
on_ref_press: app.on_about_ref_press(*args)
ClickableImage:
source: 'images/sshrc-crsh-logo.png'
size: root.size
size_hint: 1, None
# height: "100dp"
on_release:
import webbrowser
webbrowser.open("https://www.sshrc-crsh.gc.ca/home-accueil-eng.aspx")
MDBoxLayout:
ClickableImage:
source: 'images/mesc-logo.png'
size_hint: 0.33, None
height: "200dp"
on_release:
import webbrowser
webbrowser.open("https://www.maskwacised.ca")
ClickableImage:
source: 'images/fnu-logo.png'
size_hint: 0.33, None
height: "200dp"
on_release:
import webbrowser
webbrowser.open("https://www.fnuniv.ca")
ClickableImage:
source: 'images/uofa-logo.png'
size_hint: 0.33, None
height: "200dp"
on_release:
import webbrowser
webbrowser.open("https://altlab.ualberta.ca")
ClickableImage:
source: 'images/nrc-cnrc-logo.png'
size_hint: 1, None
height: "200dp"
on_release:
import webbrowser
webbrowser.open("https://nrc.canada.ca/en/research-development/research-collaboration/programs/canadian-indigenous-languages-technology-project")
MDNavigationDrawer:
id: drawerNavigator
md_bg_color: get_color_from_hex("#f7f4e7")
ContentNavigationDrawer:
orientation: 'vertical'
spacing: "15dp"
padding: 8, 0, 0, 0
ScrollView:
MDList:
MDLabel:
text: ""
size_hint: 1, 0.05
Image:
source: 'images/itwewina-with-text.png'
size: "175dp", "90dp"
size_hint: None, None
pos_hint: {'x': 0.01}
DrawerList:
id: navigation_drawer_list
MDDropDownItem:
id: labelSettingsDropdown
text: app.labelTypeList[app.labelTypeIndexSelected]
on_release: app.menu.open()
MDDropDownItem:
id: paradigmSettingsDropdown
text: "Plain English Labels"
on_release: app.paradigmLabelsMenu.open()
MDBoxLayout:
size_hint: 1, None
height: "50dp"
padding: 0, 8, 0, 0
Label:
text: "Show Emojis"
size_hint: (0.85, 1)
color: (0, 0, 0, 1)
text_size: self.size
padding_x: "5dp"
halign: 'left'
valign: 'center'
EmojiSwitch:
id: display_emoji_switch
on_active: self.emoji_display_thread()
pos_hint: {'center_y': 0.5}
active: app.displayEmojiMode
MDBoxLayout:
size_hint: 1, None
height: "50dp"
Label:
text: "Show Inflectional Category"
size_hint: (0.85, 1)
color: (0, 0, 0, 1)
text_size: self.size
padding_x: "5dp"
halign: 'left'
valign: 'center'
InflectionalSwitch:
id: inflectionalSwitch
on_active: self.changeMode()
pos_hint: {'center_y': 0.5}
active: app.displayInflectionalCategory