-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.kv
163 lines (124 loc) · 4.12 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
157
158
159
160
161
162
163
#:import ImageLeftWidget kivymd.uix.list.ImageLeftWidget
#:import IconLeftWidget kivymd.uix.list.IconLeftWidget
#:import IconLeftWidget kivymd.uix.list.IconLeftWidget
#:import images_path kivymd.images_path
#:import toast kivymd.toast.toast
<DetailedBusItem>
theme_text_color: 'Custom'
ImageLeftWidget:
source: root.icon
<ShortBusItem>
theme_text_color: 'Custom'
ImageLeftWidget:
source: root.icon
<HomeworkGridItem>
size_hint_y: None
orientation: 'horizontal'
height: self.minimum_height
padding: dp(10)
spacing: dp(10)
MDLabel:
text: root.name
size_hint_y: None
height: dp(35)
size_hint_x: 0.6
MDLabel:
size_hint_y: None
text: root.subject
height: dp(35)
size_hint_x: 0.4
MDLabel:
size_hint_y: None
text: root.due
height: dp(35)
width: dp(80)
size_hint_x: None
<HomeworkListItem>
on_release: app.homework_detailed_view(self.task_id)
<ContentScroll>
pos_hint: {"top": 1}
size_hint: (1, 1)
GridLayout:
id: box_item
cols: 1
size_hint_y: None
height: self.minimum_height
<ContentHwView>
orientation: 'vertical'
MDToolbar:
title: 'Homework'
md_bg_color: app.theme_cls.primary_color
right_action_items: [['plus', lambda x: app.changeScreen('new_task_screen')]]
MDTabs:
id: android_tabs
HomeworkTab:
text: 'Current Homework'
ContentScroll:
id: current_task_scroll
HomeworkTab:
orientation: 'vertical'
text: 'Archive Homework'
MDDropDownItem:
id: subject_dropdown
pos_hint: {"center_x": 0.5, "center_y": 0.6}
# dropdown_width_mult: 5
# size_hint: 0.6, None
padding: 15
items: app.sub_list
dropdown_bg: [1, 1, 1, 1]
on_select: app.refreshArchiveList()
ContentScroll:
id: subject_task_scroll
ScreenManager:
id: scr_mngr
Screen:
name: 'main_app_screen'
MDBottomNavigation:
id: panel
MDBottomNavigationItem:
name: 'bus'
text: 'Bus Times'
icon: 'bus'
BoxLayout:
orientation: 'vertical'
MDToolbar:
id: toolbar
title: app.bus_title
md_bg_color: app.theme_cls.primary_color
right_action_items: [['refresh', lambda x: app.refreshBusTimes()]]
ContentScroll:
id: bus_scroll
MDBottomNavigationItem:
id: home_tab
name: 'home'
text: 'Home'
icon: 'home-variant'
BoxLayout:
orientation: 'vertical'
MDToolbar:
id: toolbar
title: 'School Help'
md_bg_color: app.theme_cls.primary_color
right_action_items: [['settings', lambda x: app.changeScreen('settings_screen')]]
ContentScroll:
id: short_bus
ContentScroll:
id: short_hw
MDBottomNavigationItem:
name: 'homework'
text: 'Homework'
icon: 'book-open-variant'
on_leave: app.bus_auto_refresh()
ContentHwView:
id: homework_screen
BoxLayout:
Screen:
name: 'new_task_screen'
NewTaskPage:
Screen:
name: 'settings_screen'
SettingsPage:
Screen:
name: 'detailed_view_screen'
DetailedViewPage:
id: detailed_view