mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
removed macOS icon change
This commit is contained in:
parent
f3710de173
commit
392586eaa1
Binary file not shown.
Before Width: | Height: | Size: 65 KiB |
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user