mirror of
https://github.com/TomSchimansky/CustomTkinter.git
synced 2023-08-10 21:13:13 +03:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
84bfc776b0
@ -1,4 +1,5 @@
|
||||
include customtkinter/assets/*
|
||||
include customtkinter/assets/fonts/*
|
||||
include customtkinter/assets/fonts/Roboto/*
|
||||
include customtkinter/assets/icons/*
|
||||
include customtkinter/assets/themes/*
|
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")
|
||||
check_kwargs_empty(kwargs, raise_error=True)
|
||||
|
||||
# set icons
|
||||
try:
|
||||
customtkinter_directory = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
if sys.platform == "darwin":
|
||||
self.tk.call('wm', 'iconphoto', self._w, tkinter.PhotoImage(file=os.path.join(customtkinter_directory, "assets", "icons", "CustomTkinter_icon_macOS.png")))
|
||||
elif sys.platform.startswith("win"):
|
||||
pass
|
||||
except Exception as e:
|
||||
print(e)
|
||||
# Set Windows titlebar icon
|
||||
if sys.platform.startswith("win"):
|
||||
customtkinter_directory = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
self.iconbitmap(os.path.join(customtkinter_directory, "assets", "icons", "CustomTkinter_icon_Windows.ico"))
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
self._current_width = 600 # initial window size, independent of scaling
|
||||
self._current_height = 500
|
||||
|
Loading…
Reference in New Issue
Block a user