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:
# Set Windows titlebar icon
if sys.platform.startswith("win"):
customtkinter_directory = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) customtkinter_directory = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if sys.platform == "darwin": self.iconbitmap(os.path.join(customtkinter_directory, "assets", "icons", "CustomTkinter_icon_Windows.ico"))
self.tk.call('wm', 'iconphoto', self._w, tkinter.PhotoImage(file=os.path.join(customtkinter_directory, "assets", "icons", "CustomTkinter_icon_macOS.png"))) except Exception:
elif sys.platform.startswith("win"):
pass pass
except Exception as e:
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