-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
33 lines (22 loc) · 723 Bytes
/
main.py
File metadata and controls
33 lines (22 loc) · 723 Bytes
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
from kivymd.app import MDApp
from kivy.lang import Builder
from kivy import properties as p
from manager.navigation import NavigationManager
class MainSreenManager(NavigationManager):
pass
with open('main.kv', encoding='utf-8') as f:
Builder.load_string(f.read())
class Kvtemplate9App(MDApp):
manager = p.ObjectProperty(None)
def build(self):
self.manager = MainSreenManager()
return self.manager
def toggle_dark_mode(self):
if self.theme_cls.theme_style == "Dark":
self.theme_cls.theme_style = "Light"
else:
self.theme_cls.theme_style = "Dark"
def on_start(self):
pass
if __name__ == '__main__':
Kvtemplate9App().run()