removed macOS icon change

This commit is contained in:
TomSchimansky 2022-12-10 13:38:27 +01:00
parent f3710de173
commit 392586eaa1
2 changed files with 6 additions and 8 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

View File

@ -40,15 +40,13 @@ class CTk(tkinter.Tk, CTkAppearanceModeBaseClass, CTkScalingBaseClass):
CTkScalingBaseClass.__init__(self, scaling_type="window") CTkScalingBaseClass.__init__(self, scaling_type="window")
check_kwargs_empty(kwargs, raise_error=True) check_kwargs_empty(kwargs, raise_error=True)
# set icons
try: try:
customtkinter_directory = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Set Windows titlebar icon
if sys.platform == "darwin": if sys.platform.startswith("win"):
self.tk.call('wm', 'iconphoto', self._w, tkinter.PhotoImage(file=os.path.join(customtkinter_directory, "assets", "icons", "CustomTkinter_icon_macOS.png"))) customtkinter_directory = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
elif sys.platform.startswith("win"): self.iconbitmap(os.path.join(customtkinter_directory, "assets", "icons", "CustomTkinter_icon_Windows.ico"))
pass except Exception:
except Exception as e: pass
print(e)
self._current_width = 600 # initial window size, independent of scaling self._current_width = 600 # initial window size, independent of scaling
self._current_height = 500 self._current_height = 500