Updated icons
This commit is contained in:
parent
cb1d5bea6d
commit
e7c873108a
BIN
assets/favicon.png
Normal file
BIN
assets/favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
@ -1,5 +1,5 @@
|
|||||||
from os import path
|
from os import path
|
||||||
from tkinter import NSEW, NW, E, N, S, W, messagebox, ttk
|
from tkinter import NSEW, NW, E, N, S, W, PhotoImage, messagebox, ttk
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
import sv_ttk
|
import sv_ttk
|
||||||
@ -13,7 +13,7 @@ from classes.frames.saves import FrameSaves
|
|||||||
from classes.frames.settings import FrameSettings
|
from classes.frames.settings import FrameSettings
|
||||||
from classes.toplevel.welcome import ToplevelWelcome
|
from classes.toplevel.welcome import ToplevelWelcome
|
||||||
from modules.theme_titlebar import theme_title_bar
|
from modules.theme_titlebar import theme_title_bar
|
||||||
from modules.utils import configGet, get_string_mode, use_dark_mode
|
from modules.utils import configGet, get_string_mode, set_icon, use_dark_mode
|
||||||
|
|
||||||
|
|
||||||
class App(ThemedTk):
|
class App(ThemedTk):
|
||||||
@ -44,8 +44,8 @@ class App(ThemedTk):
|
|||||||
theme_title_bar(self, mode="dark")
|
theme_title_bar(self, mode="dark")
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
|
set_icon(self)
|
||||||
|
|
||||||
self.iconbitmap(path.join("assets", "favicon.ico"))
|
|
||||||
self.focus_set()
|
self.focus_set()
|
||||||
|
|
||||||
self.draw_main()
|
self.draw_main()
|
||||||
|
@ -8,7 +8,7 @@ from classes.custom.image_label import ImageLabel
|
|||||||
from classes.custom.themed_toplevel import ThemedToplevel
|
from classes.custom.themed_toplevel import ThemedToplevel
|
||||||
from modules.logger import logger
|
from modules.logger import logger
|
||||||
from modules.theme_titlebar import theme_title_bar
|
from modules.theme_titlebar import theme_title_bar
|
||||||
from modules.utils import configGet, configSet, use_dark_mode
|
from modules.utils import configGet, configSet, set_icon, use_dark_mode
|
||||||
|
|
||||||
|
|
||||||
class ToplevelWelcome(ThemedToplevel):
|
class ToplevelWelcome(ThemedToplevel):
|
||||||
@ -37,7 +37,8 @@ class ToplevelWelcome(ThemedToplevel):
|
|||||||
theme_title_bar(self, mode="dark")
|
theme_title_bar(self, mode="dark")
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
self.iconbitmap(path.join("assets", "favicon.ico"))
|
set_icon(self)
|
||||||
|
|
||||||
self.focus_set()
|
self.focus_set()
|
||||||
|
|
||||||
self.grid_columnconfigure(0, weight=1)
|
self.grid_columnconfigure(0, weight=1)
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
from json import JSONDecodeError, dumps, loads
|
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
|
from typing import Any, Literal
|
||||||
|
|
||||||
import darkdetect
|
import darkdetect
|
||||||
@ -92,3 +95,9 @@ def get_string_mode() -> 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")))
|
Loading…
Reference in New Issue
Block a user