diff --git a/customtkinter/__init__.py b/customtkinter/__init__.py index 95b20a7..1d01d9d 100644 --- a/customtkinter/__init__.py +++ b/customtkinter/__init__.py @@ -1,20 +1,20 @@ __version__ = "3.9" -from .customtkinter_input_dialog import CTkInputDialog -from .customtkinter_button import CTkButton -from .customtkinter_slider import CTkSlider -from .customtkinter_frame import CTkFrame -from .customtkinter_progressbar import CTkProgressBar -from .customtkinter_label import CTkLabel -from .customtkinter_entry import CTkEntry -from .customtkinter_checkbox import CTkCheckBox -from .customtkinter_radiobutton import CTkRadioButton -from .customtkinter_tk import CTk -from .customtkinter_canvas import CTkCanvas -from .customtkinter_switch import CTkSwitch -from .customtkinter_toplevel import CTkToplevel -from .customtkinter_settings import CTkSettings +from .widgets.customtkinter_input_dialog import CTkInputDialog +from .widgets.customtkinter_button import CTkButton +from .widgets.customtkinter_slider import CTkSlider +from .widgets.customtkinter_frame import CTkFrame +from .widgets.customtkinter_progressbar import CTkProgressBar +from .widgets.customtkinter_label import CTkLabel +from .widgets.customtkinter_entry import CTkEntry +from .widgets.customtkinter_checkbox import CTkCheckBox +from .widgets.customtkinter_radiobutton import CTkRadioButton +from .widgets.customtkinter_tk import CTk +from .widgets.customtkinter_canvas import CTkCanvas +from .widgets.customtkinter_switch import CTkSwitch +from .widgets.customtkinter_toplevel import CTkToplevel +from .customtkinter_settings import CTkSettings from .appearance_mode_tracker import AppearanceModeTracker from .customtkinter_theme_manager import CTkThemeManager diff --git a/customtkinter/customtkinter_base_class.py b/customtkinter/customtkinter_base_class.py deleted file mode 100644 index 06d9fc1..0000000 --- a/customtkinter/customtkinter_base_class.py +++ /dev/null @@ -1,5 +0,0 @@ -import tkinter -import tkinter.ttk as ttk - - -class CTkWidgetBaseClass: diff --git a/customtkinter/customtkinter_draw_engine.py b/customtkinter/customtkinter_draw_engine.py index 242f4dc..bf74387 100644 --- a/customtkinter/customtkinter_draw_engine.py +++ b/customtkinter/customtkinter_draw_engine.py @@ -1,7 +1,8 @@ import sys import tkinter from typing import Union -from .customtkinter_canvas import CTkCanvas + +from .widgets.customtkinter_canvas import CTkCanvas class CTkDrawEngine: diff --git a/customtkinter/customtkinter_settings.py b/customtkinter/customtkinter_settings.py index b328921..ea54f65 100644 --- a/customtkinter/customtkinter_settings.py +++ b/customtkinter/customtkinter_settings.py @@ -1,5 +1,4 @@ import sys -import platform class CTkSettings: diff --git a/customtkinter/widgets/__init__.py b/customtkinter/widgets/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/customtkinter/customtkinter_button.py b/customtkinter/widgets/customtkinter_button.py similarity index 98% rename from customtkinter/customtkinter_button.py rename to customtkinter/widgets/customtkinter_button.py index 7fa5c52..7e7b560 100644 --- a/customtkinter/customtkinter_button.py +++ b/customtkinter/widgets/customtkinter_button.py @@ -4,11 +4,11 @@ import sys from .customtkinter_tk import CTk from .customtkinter_frame import CTkFrame -from .appearance_mode_tracker import AppearanceModeTracker -from .customtkinter_theme_manager import CTkThemeManager from .customtkinter_canvas import CTkCanvas -from .customtkinter_settings import CTkSettings -from .customtkinter_draw_engine import CTkDrawEngine +from customtkinter.appearance_mode_tracker import AppearanceModeTracker +from ..customtkinter_theme_manager import CTkThemeManager +from ..customtkinter_settings import CTkSettings +from ..customtkinter_draw_engine import CTkDrawEngine class CTkButton(tkinter.Frame): diff --git a/customtkinter/customtkinter_canvas.py b/customtkinter/widgets/customtkinter_canvas.py similarity index 98% rename from customtkinter/customtkinter_canvas.py rename to customtkinter/widgets/customtkinter_canvas.py index 63c1fcb..0f0fc66 100644 --- a/customtkinter/customtkinter_canvas.py +++ b/customtkinter/widgets/customtkinter_canvas.py @@ -1,5 +1,5 @@ import tkinter -from .customtkinter_settings import CTkSettings +from ..customtkinter_settings import CTkSettings class CTkCanvas(tkinter.Canvas): diff --git a/customtkinter/customtkinter_checkbox.py b/customtkinter/widgets/customtkinter_checkbox.py similarity index 97% rename from customtkinter/customtkinter_checkbox.py rename to customtkinter/widgets/customtkinter_checkbox.py index b413ad3..8a6ee40 100644 --- a/customtkinter/customtkinter_checkbox.py +++ b/customtkinter/widgets/customtkinter_checkbox.py @@ -2,13 +2,13 @@ import tkinter import tkinter.ttk as ttk import sys -from customtkinter.customtkinter_tk import CTk -from customtkinter.customtkinter_frame import CTkFrame -from customtkinter.appearance_mode_tracker import AppearanceModeTracker -from customtkinter.customtkinter_theme_manager import CTkThemeManager -from customtkinter.customtkinter_canvas import CTkCanvas -from customtkinter.customtkinter_settings import CTkSettings -from customtkinter.customtkinter_draw_engine import CTkDrawEngine +from .customtkinter_tk import CTk +from .customtkinter_frame import CTkFrame +from .customtkinter_canvas import CTkCanvas +from ..appearance_mode_tracker import AppearanceModeTracker +from ..customtkinter_theme_manager import CTkThemeManager +from ..customtkinter_settings import CTkSettings +from ..customtkinter_draw_engine import CTkDrawEngine class CTkCheckBox(tkinter.Frame): diff --git a/customtkinter/customtkinter_entry.py b/customtkinter/widgets/customtkinter_entry.py similarity index 98% rename from customtkinter/customtkinter_entry.py rename to customtkinter/widgets/customtkinter_entry.py index 8fb7c4c..87aba53 100644 --- a/customtkinter/customtkinter_entry.py +++ b/customtkinter/widgets/customtkinter_entry.py @@ -3,11 +3,11 @@ import tkinter.ttk as ttk from .customtkinter_tk import CTk from .customtkinter_frame import CTkFrame -from .appearance_mode_tracker import AppearanceModeTracker -from .customtkinter_theme_manager import CTkThemeManager from .customtkinter_canvas import CTkCanvas -from .customtkinter_settings import CTkSettings -from .customtkinter_draw_engine import CTkDrawEngine +from ..appearance_mode_tracker import AppearanceModeTracker +from ..customtkinter_theme_manager import CTkThemeManager +from ..customtkinter_settings import CTkSettings +from ..customtkinter_draw_engine import CTkDrawEngine class CTkEntry(tkinter.Frame): diff --git a/customtkinter/customtkinter_frame.py b/customtkinter/widgets/customtkinter_frame.py similarity index 95% rename from customtkinter/customtkinter_frame.py rename to customtkinter/widgets/customtkinter_frame.py index 9348ea8..dfd3970 100644 --- a/customtkinter/customtkinter_frame.py +++ b/customtkinter/widgets/customtkinter_frame.py @@ -2,11 +2,11 @@ import tkinter import tkinter.ttk as ttk from .customtkinter_tk import CTk -from .appearance_mode_tracker import AppearanceModeTracker -from .customtkinter_theme_manager import CTkThemeManager from .customtkinter_canvas import CTkCanvas -from .customtkinter_settings import CTkSettings -from .customtkinter_draw_engine import CTkDrawEngine +from ..appearance_mode_tracker import AppearanceModeTracker +from ..customtkinter_theme_manager import CTkThemeManager +from ..customtkinter_settings import CTkSettings +from ..customtkinter_draw_engine import CTkDrawEngine class CTkFrame(tkinter.Frame): @@ -153,8 +153,8 @@ class CTkFrame(tkinter.Frame): from .customtkinter_progressbar import CTkProgressBar from .customtkinter_label import CTkLabel from .customtkinter_entry import CTkEntry - from customtkinter.customtkinter_checkbox import CTkCheckBox - from .customtkinter_button import CTkButton + from customtkinter.widgets.customtkinter_checkbox import CTkCheckBox + from customtkinter.widgets.customtkinter_button import CTkButton for child in self.winfo_children(): if isinstance(child, (CTkButton, CTkLabel, CTkSlider, CTkCheckBox, CTkEntry, CTkProgressBar, CTkFrame)): diff --git a/customtkinter/customtkinter_input_dialog.py b/customtkinter/widgets/customtkinter_input_dialog.py similarity index 97% rename from customtkinter/customtkinter_input_dialog.py rename to customtkinter/widgets/customtkinter_input_dialog.py index 6dd138a..6172f33 100644 --- a/customtkinter/customtkinter_input_dialog.py +++ b/customtkinter/widgets/customtkinter_input_dialog.py @@ -1,13 +1,13 @@ import tkinter import time -from .appearance_mode_tracker import AppearanceModeTracker -from .customtkinter_theme_manager import CTkThemeManager from .customtkinter_label import CTkLabel -from .customtkinter_button import CTkButton from .customtkinter_entry import CTkEntry from .customtkinter_frame import CTkFrame from .customtkinter_toplevel import CTkToplevel +from .customtkinter_button import CTkButton +from ..appearance_mode_tracker import AppearanceModeTracker +from ..customtkinter_theme_manager import CTkThemeManager class CTkInputDialog: diff --git a/customtkinter/customtkinter_label.py b/customtkinter/widgets/customtkinter_label.py similarity index 97% rename from customtkinter/customtkinter_label.py rename to customtkinter/widgets/customtkinter_label.py index fdbba67..8214afa 100644 --- a/customtkinter/customtkinter_label.py +++ b/customtkinter/widgets/customtkinter_label.py @@ -3,11 +3,11 @@ import tkinter.ttk as ttk from .customtkinter_tk import CTk from .customtkinter_frame import CTkFrame -from .appearance_mode_tracker import AppearanceModeTracker -from .customtkinter_theme_manager import CTkThemeManager from .customtkinter_canvas import CTkCanvas -from .customtkinter_settings import CTkSettings -from .customtkinter_draw_engine import CTkDrawEngine +from ..appearance_mode_tracker import AppearanceModeTracker +from ..customtkinter_theme_manager import CTkThemeManager +from ..customtkinter_settings import CTkSettings +from ..customtkinter_draw_engine import CTkDrawEngine class CTkLabel(tkinter.Frame): diff --git a/customtkinter/customtkinter_progressbar.py b/customtkinter/widgets/customtkinter_progressbar.py similarity index 97% rename from customtkinter/customtkinter_progressbar.py rename to customtkinter/widgets/customtkinter_progressbar.py index 45ff428..4634ef6 100644 --- a/customtkinter/customtkinter_progressbar.py +++ b/customtkinter/widgets/customtkinter_progressbar.py @@ -4,11 +4,11 @@ import tkinter.ttk as ttk from .customtkinter_tk import CTk from .customtkinter_frame import CTkFrame -from .appearance_mode_tracker import AppearanceModeTracker -from .customtkinter_theme_manager import CTkThemeManager from .customtkinter_canvas import CTkCanvas -from .customtkinter_draw_engine import CTkDrawEngine -from .customtkinter_settings import CTkSettings +from ..appearance_mode_tracker import AppearanceModeTracker +from ..customtkinter_theme_manager import CTkThemeManager +from ..customtkinter_draw_engine import CTkDrawEngine +from ..customtkinter_settings import CTkSettings class CTkProgressBar(tkinter.Frame): diff --git a/customtkinter/customtkinter_radiobutton.py b/customtkinter/widgets/customtkinter_radiobutton.py similarity index 97% rename from customtkinter/customtkinter_radiobutton.py rename to customtkinter/widgets/customtkinter_radiobutton.py index e81887d..cb7078b 100644 --- a/customtkinter/customtkinter_radiobutton.py +++ b/customtkinter/widgets/customtkinter_radiobutton.py @@ -2,13 +2,13 @@ import tkinter import tkinter.ttk as ttk import sys -from customtkinter.customtkinter_tk import CTk -from customtkinter.customtkinter_frame import CTkFrame -from customtkinter.appearance_mode_tracker import AppearanceModeTracker -from customtkinter.customtkinter_theme_manager import CTkThemeManager -from customtkinter.customtkinter_canvas import CTkCanvas -from customtkinter.customtkinter_settings import CTkSettings -from customtkinter.customtkinter_draw_engine import CTkDrawEngine +from .customtkinter_tk import CTk +from .customtkinter_frame import CTkFrame +from .customtkinter_canvas import CTkCanvas +from ..appearance_mode_tracker import AppearanceModeTracker +from ..customtkinter_theme_manager import CTkThemeManager +from ..customtkinter_settings import CTkSettings +from ..customtkinter_draw_engine import CTkDrawEngine class CTkRadioButton(tkinter.Frame): diff --git a/customtkinter/customtkinter_slider.py b/customtkinter/widgets/customtkinter_slider.py similarity index 98% rename from customtkinter/customtkinter_slider.py rename to customtkinter/widgets/customtkinter_slider.py index ea7d1f1..9c423bf 100644 --- a/customtkinter/customtkinter_slider.py +++ b/customtkinter/widgets/customtkinter_slider.py @@ -4,11 +4,11 @@ import sys from .customtkinter_tk import CTk from .customtkinter_frame import CTkFrame -from .appearance_mode_tracker import AppearanceModeTracker -from .customtkinter_theme_manager import CTkThemeManager -from .customtkinter_settings import CTkSettings -from .customtkinter_draw_engine import CTkDrawEngine from .customtkinter_canvas import CTkCanvas +from ..appearance_mode_tracker import AppearanceModeTracker +from ..customtkinter_theme_manager import CTkThemeManager +from ..customtkinter_settings import CTkSettings +from ..customtkinter_draw_engine import CTkDrawEngine class CTkSlider(tkinter.Frame): diff --git a/customtkinter/customtkinter_switch.py b/customtkinter/widgets/customtkinter_switch.py similarity index 98% rename from customtkinter/customtkinter_switch.py rename to customtkinter/widgets/customtkinter_switch.py index 5f30aad..9ae539e 100644 --- a/customtkinter/customtkinter_switch.py +++ b/customtkinter/widgets/customtkinter_switch.py @@ -4,11 +4,11 @@ import sys from .customtkinter_tk import CTk from .customtkinter_frame import CTkFrame -from .appearance_mode_tracker import AppearanceModeTracker -from .customtkinter_theme_manager import CTkThemeManager -from .customtkinter_settings import CTkSettings -from .customtkinter_draw_engine import CTkDrawEngine from .customtkinter_canvas import CTkCanvas +from ..appearance_mode_tracker import AppearanceModeTracker +from ..customtkinter_theme_manager import CTkThemeManager +from ..customtkinter_settings import CTkSettings +from ..customtkinter_draw_engine import CTkDrawEngine class CTkSwitch(tkinter.Frame): diff --git a/customtkinter/customtkinter_tk.py b/customtkinter/widgets/customtkinter_tk.py similarity index 96% rename from customtkinter/customtkinter_tk.py rename to customtkinter/widgets/customtkinter_tk.py index d927635..9a9d1b1 100644 --- a/customtkinter/customtkinter_tk.py +++ b/customtkinter/widgets/customtkinter_tk.py @@ -5,8 +5,8 @@ import os import platform import ctypes -from .appearance_mode_tracker import AppearanceModeTracker -from .customtkinter_theme_manager import CTkThemeManager +from ..appearance_mode_tracker import AppearanceModeTracker +from ..customtkinter_theme_manager import CTkThemeManager class CTk(tkinter.Tk): @@ -102,8 +102,8 @@ class CTk(tkinter.Tk): from .customtkinter_label import CTkLabel from .customtkinter_frame import CTkFrame from .customtkinter_entry import CTkEntry - from customtkinter.customtkinter_checkbox import CTkCheckBox - from .customtkinter_button import CTkButton + from customtkinter.widgets.customtkinter_checkbox import CTkCheckBox + from customtkinter.widgets.customtkinter_button import CTkButton for child in self.winfo_children(): if isinstance(child, (CTkFrame, CTkButton, CTkLabel, CTkSlider, CTkCheckBox, CTkEntry, CTkProgressBar)): diff --git a/customtkinter/customtkinter_toplevel.py b/customtkinter/widgets/customtkinter_toplevel.py similarity index 96% rename from customtkinter/customtkinter_toplevel.py rename to customtkinter/widgets/customtkinter_toplevel.py index 2611bf0..6ff801f 100644 --- a/customtkinter/customtkinter_toplevel.py +++ b/customtkinter/widgets/customtkinter_toplevel.py @@ -5,8 +5,8 @@ import os import platform import ctypes -from .appearance_mode_tracker import AppearanceModeTracker -from .customtkinter_theme_manager import CTkThemeManager +from ..appearance_mode_tracker import AppearanceModeTracker +from ..customtkinter_theme_manager import CTkThemeManager class CTkToplevel(tkinter.Toplevel): @@ -88,8 +88,8 @@ class CTkToplevel(tkinter.Toplevel): from .customtkinter_label import CTkLabel from .customtkinter_frame import CTkFrame from .customtkinter_entry import CTkEntry - from customtkinter.customtkinter_checkbox import CTkCheckBox - from .customtkinter_button import CTkButton + from customtkinter.widgets.customtkinter_checkbox import CTkCheckBox + from customtkinter.widgets.customtkinter_button import CTkButton for child in self.winfo_children(): if isinstance(child, (CTkFrame, CTkButton, CTkLabel, CTkSlider, CTkCheckBox, CTkEntry, CTkProgressBar)):