This repository has been archived by the owner on Feb 7, 2023. It is now read-only.
forked from willm0602/ThymeSaver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainAppScreen.py
160 lines (117 loc) · 3.8 KB
/
MainAppScreen.py
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
KV = '''
<OtherScreen>:
name: 'other'
MDLabel:
text: "other screen!"
<MainScreen>:
name: 'main'
MDLabel:
text: "main screen!"
<Check@MDCheckbox>:
group: 'group'
size_hint: None, None
size: dp(48), dp(48) #48
<dialog_content>
orientation:"vertical"
spaceing: "12dp"
size_hint_y: None
height: "120dp"
MDLabel:
text: "Does this item expire?"
valign: "top"
MDRaisedButton:
text: "Select an expiration date"
pos_hint: {'center_x': .5, 'center_y': .5}
on_release: app.show_date_picker()
MDTextField:
hint_text: "Quantity"
# Menu item in the DrawerList list.
<ItemDrawer>:
theme_text_color: "Custom"
on_release: self.parent.set_color_item(self)
on_press: self.parent.test(self)
IconLeftWidget:
id: icon
icon: root.icon
theme_text_color: "Custom"
text_color: root.text_color
<ContentNavigationDrawer>: #All of the info in the nav drawer
orientation: "vertical"
padding: "8dp"
spacing: "8dp"
AnchorLayout:
anchor_x: "left"
size_hint_y: None
height: avatar.height
Image: #User image, not necessary but could be cool. Current Captain Wheeze
id: avatar
size_hint: None, None
size: "56dp", "56dp"
source: "CaptainWheezeopp.png"
MDLabel: # This will eventually be the username of the user
text: "A$AP Sidebar"
font_style: "Button"
size_hint_y: None
height: self.texture_size[1]
MDLabel: # and this will be the users email
text: "SadWill@gmail.com"
font_style: "Caption"
size_hint_y: None
height: self.texture_size[1]
ScrollView: #This is the nav list in the navbar, probably doesn't need a scrollview
DrawerList:
id: md_list
<ListItemWithCheckbox>:
IconLeftWidget:
icon: root.icon
RightCheckbox:
<SwipeItem>:
size_hint_y: 1
height: content.height
pos_hint: {"center_x": 0.5, "center_y": 0.5}
MDCardSwipeLayerBox:
padding: "8dp"
MDIconButton:
icon: "trash-can"
pos_hint: {"center_y": 0.5}
on_release: app.remove_item(root)
MDIconButton:
icon: "database-plus"
pos_hint: {"center_y": 0.5}
on_release: app.add_pantry_item(root)
MDCardSwipeFrontBox:
OneLineListItem: # was OneLineListItem
id: content
text: root.text
icon: root.icon
_no_ripple_effect: True
RightCheckBox:
MDScreen: #main screen MDS
MDBoxLayout:
orientation: "vertical"
spacing: "10dp"
ScrollView:
scroll_timeout: 100
MDList:
id:md_list
padding: 0
MDFloatingActionButtonSpeedDial:
data: app.data
callback: app.callback #testing here
root_button_anim: True
hint_animation: True
NavigationLayout: # This is the top bar for naviagation, currently blue
ScreenManager:
Screen:
BoxLayout:
orientation: 'vertical'
MDToolbar:
title: "Yung Money -- The List"
elevation: 10
left_action_items: [['menu', lambda x: nav_drawer.toggle_nav_drawer()]]
Widget:
MDNavigationDrawer: # This is the ||| button on the top left that makes the nav bar work
id: nav_drawer
ContentNavigationDrawer: # This is the contents that live inside it
id: content_drawer
'''