added fullscreen showcase screen (currently in development and still buggy

This commit is contained in:
janis
2022-09-27 15:34:36 +02:00
parent 82b0e29d8d
commit 706e4da77c
20 changed files with 58 additions and 4 deletions

24
musicplayer.py Normal file → Executable file
View File

@@ -11,6 +11,7 @@ else:
os.environ["KIVY_NO_CONSOLELOG"] = "1"
import signal
import time
import multiprocessing
from kivy.core.window import Window, Config
from kivy.uix.screenmanager import ScreenManager
@@ -55,6 +56,17 @@ class invalidpathPU(Popup):
pass
class LeavePU(Popup):
def check_pwd(self):
if self.ids.passw.text == config["Security"]["pwd"]:
self.manager.current = "Main"
self.manager.transition.direction = "right"
self.dismiss()
else:
time.sleep(2)
self.ids.output.text = "Password wrong, please try again!"
###########
# SCREENS
###########
@@ -264,13 +276,19 @@ class Main(MDScreen):
def back_here(self):
if self.manager.current == "Showcase":
self.manager.current = "Main"
self.manager.transition.direction = "right"
if config["Security"]["pwdFSExit"] == "True":
self.open_leave_popup()
else:
self.manager.current = "Main"
self.manager.transition.direction = "right"
elif self.manager.current == "Main":
self.go_back()
else:
pass
def open_leave_popup(self):
LeavePU().open()
class ShowcaseS(MDScreen):
def disablefullscreen(self):
@@ -303,7 +321,7 @@ if __name__ == "__main__":
try:
Window.size = (int(config['Display']['width']), int(config['Display']['height']))
except Exception as e:
print("Unvalid config string found for in Display settings")
print("Unvalid config string found in Display settings")
Config.set('graphics', 'width', '800')
Config.set('graphics', 'height', '600')