Redesign root icon setting system
This commit is contained in:
1 parent
9dc7a1d65f
commit
f74f7c8be7
3 files changed
+10
-15
No files matched your search
@@ -26,7 +26,7 @@ if __name__ == "__main__":
|
||||
from settings import Settings
|
||||
from version import __version__
|
||||
from exceptions import CaptchaRequired
|
||||
from utils import resource_path, get_photo_image
|
||||
from utils import resource_path, set_root_icon
|
||||
from constants import CALL, SELF_PATH, FILE_FORMATTER, LOG_PATH, WINDOW_TITLE
|
||||
|
||||
warnings.simplefilter("default", ResourceWarning)
|
||||
@@ -92,10 +92,7 @@ if __name__ == "__main__":
|
||||
root = tk.Tk()
|
||||
root.overrideredirect(True)
|
||||
root.withdraw()
|
||||
icon_photo = get_photo_image(root, resource_path("pickaxe.ico"))
|
||||
root.iconphoto(True, icon_photo)
|
||||
# keep a reference to the PhotoImage to avoid the ResourceWarning
|
||||
root._icon_image = icon_photo # type: ignore[attr-defined]
|
||||
set_root_icon(root, resource_path("pickaxe.ico"))
|
||||
root.update()
|
||||
parser = Parser(
|
||||
SELF_PATH.name,
|
||||
|
||||
Reference in new issue
Block a user