From 4ff3506a4a0f67af71a54c3757ac93a63af15b82 Mon Sep 17 00:00:00 2001 From: Youssef Alkhodary <82382970+UserJoo9@users.noreply.github.com> Date: Sat, 13 May 2023 16:13:05 +0300 Subject: [PATCH] fix stucking toplevel iconbitmap in windows fix enforcing the default CTkTopLevel iconbitmap in windows --- customtkinter/windows/ctk_toplevel.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/customtkinter/windows/ctk_toplevel.py b/customtkinter/windows/ctk_toplevel.py index 3a351dc..a24ae57 100644 --- a/customtkinter/windows/ctk_toplevel.py +++ b/customtkinter/windows/ctk_toplevel.py @@ -38,14 +38,6 @@ class CTkToplevel(tkinter.Toplevel, CTkAppearanceModeBaseClass, CTkScalingBaseCl CTkScalingBaseClass.__init__(self, scaling_type="window") check_kwargs_empty(kwargs, raise_error=True) - try: - # Set Windows titlebar icon - if sys.platform.startswith("win"): - customtkinter_directory = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - self.after(200, lambda: self.iconbitmap(os.path.join(customtkinter_directory, "assets", "icons", "CustomTkinter_icon_Windows.ico"))) - except Exception: - pass - self._current_width = 200 # initial window size, always without scaling self._current_height = 200 self._min_width: int = 0