Skip to content
This repository was archived by the owner on Oct 28, 2022. It is now read-only.

Commit 3fe5b03

Browse files
committed
fix more icon crap
1 parent 3f1961a commit 3fe5b03

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

Icons.py

+3-1
Large diffs are not rendered by default.

gui.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,13 @@ class GuiApplication:
103103
def __init__(self):
104104
self.window = Tk()
105105

106+
# this is so dumb
106107
if system() == 'Windows':
107-
file_data = base64.decodebytes(ICON_WIN)
108-
icon = PhotoImage(data=file_data)
109-
self.window.iconphoto(True, icon)
110-
108+
with open('temp_icon.ico', 'wb') as temp_icon:
109+
temp_icon.write(base64.b64decode(ICON_WIN))
110+
self.window.iconbitmap('temp_icon.ico')
111+
os.remove('temp_icon.ico')
112+
111113
self.window.wm_title(MAIN_TITLE)
112114
self.window.resizable(False, False)
113115

0 commit comments

Comments
 (0)