Working on new welcome screen

This commit is contained in:
2023-01-23 16:38:47 +01:00
parent a49f629bfc
commit 67270252d2
5 changed files with 75 additions and 31 deletions

View File

@@ -96,6 +96,18 @@ def get_string_mode() -> Literal["dark", "light"]:
return "dark" if use_dark_mode() is True else "light"
def resize_window(me: Misc, width: int, height: int) -> None:
me.window_width = width
me.window_height = height
me.screen_width = me.winfo_screenwidth()
me.screen_height = me.winfo_screenheight()
me.center_x = int(me.screen_width/2 - me.window_width / 2)
me.center_y = int(me.screen_height/2 - me.window_height / 2)
me.geometry(f'{me.window_width}x{me.window_height}+{me.center_x}+{me.center_y}')
def set_icon(me: Misc) -> None:
if osname == "nt":
me.iconbitmap(path.join("assets", "favicon.ico"))