-
-
Notifications
You must be signed in to change notification settings - Fork 46
/
main.py
37 lines (27 loc) · 993 Bytes
/
main.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
import os
import sys
from pathlib import Path
import kivy
kivy.require("2.2.0")
from kivy.core.window import Window
from kivymd.app import MDApp
from View.ManagerScreen.manager_screen import ManagerScreen
if getattr(sys, "frozen", False):
os.environ["KITCHEN_SINK_ROOT"] = sys._MEIPASS
else:
sys.path.append(os.path.abspath(__file__).split("demos")[0])
os.environ["KITCHEN_SINK_ROOT"] = str(Path(__file__).parent)
os.environ["KITCHEN_SINK_ASSETS"] = os.path.join(
os.environ["KITCHEN_SINK_ROOT"], f"assets{os.sep}"
)
Window.softinput_mode = "below_target"
class KitchenSink(MDApp):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.theme_cls.material_style = "M3"
self.theme_cls.primary_palette = "Indigo"
self.manager_screen = ManagerScreen()
def build(self) -> ManagerScreen:
self.manager_screen.add_widget(self.manager_screen.create_screen("menu"))
return self.manager_screen
KitchenSink().run()