Icon fixed

This commit is contained in:
2025-11-04 20:23:26 +03:00
parent 7f92a27b49
commit 6147eb1597
3 changed files with 2 additions and 31 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

+1 -30
View File
@@ -31,37 +31,8 @@ class TranscriberApp(ctk.CTk):
# TODO: fix this stuff
base_path = getattr(sys, "_MEIPASS", os.path.dirname(os.path.abspath(__file__)))
icon_path = os.path.join(base_path, "assets", "logo.png")
applied_method = None
try:
icon_path = os.path.join(base_path, "assets", "logo.ico")
self.iconbitmap(icon_path)
applied_method = "iconbitmap"
except Exception as e:
print("iconbitmap did not work:", e)
if applied_method is None:
try:
img = tk.PhotoImage(file=icon_path)
self.iconphoto(False, img)
applied_method = "iconphoto"
except Exception as e:
print("iconphoto did not work:", e)
if applied_method is None:
try:
pil = Image.open(icon_path)
photo = ImageTk.PhotoImage(pil)
self.tk.call('wm', 'iconphoto', self._w, photo)
applied_method = "tk.call"
except Exception as e:
print("wm iconphoto via tk.call did not work:", e)
if applied_method:
print(f"Applied method: {applied_method}")
else:
print("Can't set an icon.")
# states
self.progress_queue = queue.Queue()