-
Notifications
You must be signed in to change notification settings - Fork 0
/
mdkvfile.kv
116 lines (115 loc) · 5 KB
/
mdkvfile.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
#:import Toolbar kivymd.toolbar.Toolbar
#:import ThemeManager kivymd.theming.ThemeManager
#:import MDNavigationDrawer kivymd.navigationdrawer.MDNavigationDrawer
#:import NavigationLayout kivymd.navigationdrawer.NavigationLayout
#:import NavigationDrawerDivider kivymd.navigationdrawer.NavigationDrawerDivider
#:import NavigationDrawerToolbar kivymd.navigationdrawer.NavigationDrawerToolbar
#:import NavigationDrawerSubheader kivymd.navigationdrawer.NavigationDrawerSubheader
#:import MDCheckbox kivymd.selectioncontrols.MDCheckbox
#:import MDSwitch kivymd.selectioncontrols.MDSwitch
#:import MDList kivymd.list.MDList
#:import OneLineListItem kivymd.list.OneLineListItem
#:import TwoLineListItem kivymd.list.TwoLineListItem
#:import ThreeLineListItem kivymd.list.ThreeLineListItem
#:import OneLineAvatarListItem kivymd.list.OneLineAvatarListItem
#:import OneLineIconListItem kivymd.list.OneLineIconListItem
#:import OneLineAvatarIconListItem kivymd.list.OneLineAvatarIconListItem
#:import MDTextField kivymd.textfields.MDTextField
#:import MDSpinner kivymd.spinner.MDSpinner
#:import MDCard kivymd.card.MDCard
#:import MDSeparator kivymd.card.MDSeparator
#:import MDDropdownMenu kivymd.menu.MDDropdownMenu
#:import get_color_from_hex kivy.utils.get_color_from_hex
#:import colors kivymd.color_definitions.colors
#:import SmartTile kivymd.grid.SmartTile
#:import MDSlider kivymd.slider.MDSlider
#:import MDTabbedPanel kivymd.tabs.MDTabbedPanel
#:import MDTab kivymd.tabs.MDTab
#:import MDProgressBar kivymd.progressbar.MDProgressBar
#:import MDAccordion kivymd.accordion.MDAccordion
#:import MDAccordionItem kivymd.accordion.MDAccordionItem
#:import MDAccordionSubItem kivymd.accordion.MDAccordionSubItem
#:import MDThemePicker kivymd.theme_picker.MDThemePicker
#:import MDBottomNavigation kivymd.tabs.MDBottomNavigation
#:import MDBottomNavigationItem kivymd.tabs.MDBottomNavigationItem
NavigationLayout:
id: nav_layout
MDNavigationDrawer:
id: nav_drawer
NavigationDrawerIconButton:
icon: 'record'
text: 'Record a Vox'
on_release: root.ids.scr_mngr.current = 'record'
NavigationDrawerIconButton:
icon: 'file-find'
text: 'Send to friend'
on_release: root.ids.scr_mngr.current = 'send'
NavigationDrawerIconButton:
icon: 'settings'
text: 'Settings'
on_release: root.ids.scr_mngr.current = 'settings'
NavigationDrawerToolbar:
BoxLayout:
orientation: 'vertical'
Toolbar:
id: toolbar
title: 'Vox'
md_bg_color: app.theme_cls.primary_color
background_palette: 'Primary'
background_hue: '500'
left_action_items: [['menu', lambda x: root.toggle_nav_drawer()]]
# right_action_items: [['dots-vertical', lambda x: root.toggle_nav_drawer()]]
ScreenManager:
id: scr_mngr
Screen:
name: 'main'
BoxLayout:
orientation: 'horizontal'
Image:
source: 'assets/main.jpg'
MDLabel:
text: 'Welcome to Vox\nTo begin, press the hamburger menu and click Record a vox\n'
halign: 'center'
valign: 'center'
Screen:
name: 'record'
BoxLayout:
orientation: 'vertical'
MDIconButton:
icon: 'record'
size: 5 * dp(48), dp(48)
pos_hint: {'center_x': 0.5}
halign: 'center'
valign: 'center'
on_press: app.record(str(username.text))
Screen:
name: 'send'
BoxLayout:
orientation: 'vertical'
FileChooserListView:
id: fileChooser
path: '.'
on_selection: filename.text = self.selection and self.selection[0] or ''
MDTextField:
id: filename
hint_text: 'Choose a filename to send'
MDRaisedButton:
size_hint: None, None
text: 'Send file'
on_press: link.text = app.send(filename.text)
BoxLayout:
orientation: 'vertical'
MDTextField:
id: link
hint_text: 'Your unique link will be generated here'
# size_hint: None, None
Screen:
name: 'settings'
BoxLayout:
orientation: 'horizontal'
MDTextField:
id: username
hint_text: 'Choose a unique username'
text: 'user123'
halign: 'center'
valign: 'center'