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:
|
||||||
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
|
||||||
|
Loading…
Reference in New Issue
Block a user