Working on new welcome screen
This commit is contained in:
@@ -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"))
|
||||
|
Reference in New Issue
Block a user