diff --git a/Readme_pypi.md b/Readme_pypi.md deleted file mode 100644 index 25d8c6b..0000000 --- a/Readme_pypi.md +++ /dev/null @@ -1,16 +0,0 @@ -# CustomTkinter - -![](https://raw.githubusercontent.com/TomSchimansky/CustomTkinter/master/documentation_images/customtkinter_mode_switch.gif) - -With CustomTkinter you can create modern looking user -interfaces in python with tkinter. CustomTkinter is a -tkinter extension which provides extra ui-elements like -the CTkButton, which can be used like a normal tkinter.Button, -but can be customized with a border and round edges. - -CustomTkinter also supports a light and dark theme, -which can either be set manually or get controlled by -the system appearance mode (only macOS). - -For detailed information and documentation visit the github page: -https://github.com/TomSchimansky/CustomTkinter \ No newline at end of file diff --git a/customtkinter/customtkinter_button.py b/customtkinter/customtkinter_button.py index 4cdc357..4d45041 100644 --- a/customtkinter/customtkinter_button.py +++ b/customtkinter/customtkinter_button.py @@ -56,6 +56,7 @@ class CTkButton(tkinter.Frame): self.master.config = new_configure self.master.configure = new_configure + # add set_appearance_mode method to callback list of AppearanceModeTracker for appearance mode changes AppearanceModeTracker.add(self.set_appearance_mode, self) self.appearance_mode = AppearanceModeTracker.get_mode() # 0: "Light" 1: "Dark" diff --git a/customtkinter/customtkinter_checkbox.py b/customtkinter/customtkinter_checkbox.py index bfe2374..434a918 100644 --- a/customtkinter/customtkinter_checkbox.py +++ b/customtkinter/customtkinter_checkbox.py @@ -58,6 +58,7 @@ class CTkCheckBox(tkinter.Frame): self.master.config = new_configure self.master.configure = new_configure + # add set_appearance_mode method to callback list of AppearanceModeTracker for appearance mode changes AppearanceModeTracker.add(self.set_appearance_mode, self) self.appearance_mode = AppearanceModeTracker.get_mode() # 0: "Light" 1: "Dark" diff --git a/customtkinter/customtkinter_entry.py b/customtkinter/customtkinter_entry.py index acac55a..e7878ac 100644 --- a/customtkinter/customtkinter_entry.py +++ b/customtkinter/customtkinter_entry.py @@ -50,6 +50,7 @@ class CTkEntry(tkinter.Frame): self.master.config = new_configure self.master.configure = new_configure + # add set_appearance_mode method to callback list of AppearanceModeTracker for appearance mode changes AppearanceModeTracker.add(self.change_appearance_mode, self) self.appearance_mode = AppearanceModeTracker.get_mode() # 0: "Light" 1: "Dark" diff --git a/customtkinter/customtkinter_frame.py b/customtkinter/customtkinter_frame.py index b8a7d6a..5fc0fbf 100644 --- a/customtkinter/customtkinter_frame.py +++ b/customtkinter/customtkinter_frame.py @@ -41,6 +41,7 @@ class CTkFrame(tkinter.Frame): self.master.config = new_configure self.master.configure = new_configure + # add set_appearance_mode method to callback list of AppearanceModeTracker for appearance mode changes AppearanceModeTracker.add(self.change_appearance_mode, self) self.appearance_mode = AppearanceModeTracker.get_mode() # 0: "Light" 1: "Dark" diff --git a/customtkinter/customtkinter_label.py b/customtkinter/customtkinter_label.py index c9bb212..443b1aa 100644 --- a/customtkinter/customtkinter_label.py +++ b/customtkinter/customtkinter_label.py @@ -48,6 +48,7 @@ class CTkLabel(tkinter.Frame): self.master.config = new_configure self.master.configure = new_configure + # add set_appearance_mode method to callback list of AppearanceModeTracker for appearance mode changes AppearanceModeTracker.add(self.change_appearance_mode, self) self.appearance_mode = AppearanceModeTracker.get_mode() # 0: "Light" 1: "Dark" diff --git a/customtkinter/customtkinter_progressbar.py b/customtkinter/customtkinter_progressbar.py index ad9c6f0..a19f4d0 100644 --- a/customtkinter/customtkinter_progressbar.py +++ b/customtkinter/customtkinter_progressbar.py @@ -47,6 +47,7 @@ class CTkProgressBar(tkinter.Frame): self.master.config = new_configure self.master.configure = new_configure + # add set_appearance_mode method to callback list of AppearanceModeTracker for appearance mode changes AppearanceModeTracker.add(self.change_appearance_mode, self) self.appearance_mode = AppearanceModeTracker.get_mode() # 0: "Light" 1: "Dark" diff --git a/customtkinter/customtkinter_radiobutton.py b/customtkinter/customtkinter_radiobutton.py index 84716b8..7a42c83 100644 --- a/customtkinter/customtkinter_radiobutton.py +++ b/customtkinter/customtkinter_radiobutton.py @@ -55,6 +55,7 @@ class CTkRadioButton(tkinter.Frame): self.master.config = new_configure self.master.configure = new_configure + # add set_appearance_mode method to callback list of AppearanceModeTracker for appearance mode changes AppearanceModeTracker.add(self.set_appearance_mode, self) self.appearance_mode = AppearanceModeTracker.get_mode() # 0: "Light" 1: "Dark" diff --git a/customtkinter/customtkinter_slider.py b/customtkinter/customtkinter_slider.py index f7b1c47..1a33ba1 100644 --- a/customtkinter/customtkinter_slider.py +++ b/customtkinter/customtkinter_slider.py @@ -55,6 +55,7 @@ class CTkSlider(tkinter.Frame): self.master.config = new_configure self.master.configure = new_configure + # add set_appearance_mode method to callback list of AppearanceModeTracker for appearance mode changes AppearanceModeTracker.add(self.change_appearance_mode, self) self.appearance_mode = AppearanceModeTracker.get_mode() # 0: "Light" 1: "Dark" diff --git a/customtkinter/customtkinter_switch.py b/customtkinter/customtkinter_switch.py index b471fe4..deb3331 100644 --- a/customtkinter/customtkinter_switch.py +++ b/customtkinter/customtkinter_switch.py @@ -56,6 +56,7 @@ class CTkSwitch(tkinter.Frame): self.master.config = new_configure self.master.configure = new_configure + # add set_appearance_mode method to callback list of AppearanceModeTracker for appearance mode changes AppearanceModeTracker.add(self.change_appearance_mode, self) self.appearance_mode = AppearanceModeTracker.get_mode() # 0: "Light" 1: "Dark" diff --git a/customtkinter/customtkinter_tk.py b/customtkinter/customtkinter_tk.py index d4c2b9e..d927635 100644 --- a/customtkinter/customtkinter_tk.py +++ b/customtkinter/customtkinter_tk.py @@ -27,6 +27,7 @@ class CTk(tkinter.Tk): self.fg_color = kwargs["background"] del kwargs["background"] + # add set_appearance_mode method to callback list of AppearanceModeTracker for appearance mode changes AppearanceModeTracker.add(self.set_appearance_mode, self) super().configure(bg=CTkThemeManager.single_color(self.fg_color, self.appearance_mode)) super().title("CTk") diff --git a/customtkinter/customtkinter_toplevel.py b/customtkinter/customtkinter_toplevel.py index 43d2cec..2611bf0 100644 --- a/customtkinter/customtkinter_toplevel.py +++ b/customtkinter/customtkinter_toplevel.py @@ -27,6 +27,7 @@ class CTkToplevel(tkinter.Toplevel): self.fg_color = kwargs["background"] del kwargs["background"] + # add set_appearance_mode method to callback list of AppearanceModeTracker for appearance mode changes AppearanceModeTracker.add(self.set_appearance_mode, self) super().configure(bg=CTkThemeManager.single_color(self.fg_color, self.appearance_mode)) super().title("CTkToplevel") diff --git a/setup.py b/setup.py index 784ea04..d3d1ed6 100644 --- a/setup.py +++ b/setup.py @@ -11,13 +11,6 @@ import os # -def read(filename): - try: - return open(os.path.join(os.path.dirname(__file__), filename)).read() - except Exception as err: - return "" - - setup(name="customtkinter", version="3.9", author="Tom Schimansky", @@ -25,7 +18,7 @@ setup(name="customtkinter", url="https://github.com/TomSchimansky/CustomTkinter", description="Create modern looking gui with tkinter and python", long_description_content_type="text/markdown", - long_description=read('Readme_pypi.md'), + long_description="# CustomTkinter\n\nDetailed Information: https://github.com/TomSchimansky/CustomTkinter", include_package_data=True, packages=["customtkinter"], classifiers=["Operating System :: OS Independent",