Updated icons

This commit is contained in:
2023-01-23 12:22:54 +01:00
parent cb1d5bea6d
commit e7c873108a
4 changed files with 16 additions and 6 deletions

View File

@@ -1,4 +1,7 @@
from json import JSONDecodeError, dumps, loads
from os import path
from os import name as osname
from tkinter import Misc, PhotoImage
from typing import Any, Literal
import darkdetect
@@ -91,4 +94,10 @@ def get_string_mode() -> Literal["dark", "light"]:
* `Literal["dark", "light"]`
"""
return "dark" if use_dark_mode() is True else "light"
return "dark" if use_dark_mode() is True else "light"
def set_icon(me: Misc) -> None:
if osname == "nt":
me.iconbitmap(path.join("assets", "favicon.ico"))
else:
me.iconphoto(True, PhotoImage(file=path.join("assets", "favicon.png")))