From bd19d2f3e6352cda87af247552f333814a2cff04 Mon Sep 17 00:00:00 2001 From: FTE <2336812+felipetesc@users.noreply.github.com> Date: Tue, 2 Aug 2022 14:48:31 -0300 Subject: [PATCH 1/4] added white variant --- customtkinter/assets/themes/sweetkind.json | 75 +++++++++++----------- 1 file changed, 37 insertions(+), 38 deletions(-) diff --git a/customtkinter/assets/themes/sweetkind.json b/customtkinter/assets/themes/sweetkind.json index 1756db5..27d91e0 100644 --- a/customtkinter/assets/themes/sweetkind.json +++ b/customtkinter/assets/themes/sweetkind.json @@ -1,41 +1,42 @@ { "color": { - "window_bg_color": ["#181b28", "#181b28"], - "button": ["#212435", "#212435"], - "button_hover": ["#171926", "#171926"], - "button_border": ["#080b12", "#080b12"], + "window_bg_color": ["#ebf0f5", "#181b28"], + "button": ["#e46bff", "#212435"], + "button_hover": ["#8593d6", "#171926"], + "button_active": ["#9b45ff", "#9b45ff"], + "button_border": ["#525983", "#080b12"], "checkbox_border": ["#01e9c4", "#01e9c4"], "checkmark": ["#01e9c4", "#01e9c4"], - "entry": ["#212435", "#212435"], - "entry_border": ["#080b12", "#080b12"], + "entry": ["#dee2e7", "#212435"], + "entry_border": ["#fa00d0", "#080b12"], "entry_placeholder_text": ["#cdc8ce", "#cdc8ce"], - "frame_border": ["#10121f", "#10121f"], - "frame_low": ["#181b28", "#181b28"], - "frame_high": ["#181b28", "#181b28"], + "frame_border": ["#525983", "#10121f"], + "frame_low": ["#dee2e7", "#181b28"], + "frame_high": ["#dee2e7", "#1b1e2d"], "label": [null, null], - "text": ["#cdc8ce", "#cdc8ce"], - "text_disabled": ["#7a8894", "#7a8894"], + "text": ["#0c0e14", "#cdc8ce"], + "text_disabled": ["#5e6062", "#7a8894"], "text_button_disabled": ["#7a8894", "#7a8894"], - "progressbar": ["#c452f8", "#c452f8"], + "progressbar": ["#fa00d0", "#fa00d0"], "progressbar_progress": ["#363844", "#363844"], - "progressbar_border": ["#0d101f", "#0d101f"], - "slider": ["#c452f8", "#c452f8"], - "slider_progress": ["#363844", "#363844"], - "slider_button": ["#5b40c5", "#5b40c5"], - "slider_button_hover": ["#c452f8", "#c452f8"], - "switch": ["#1f2233", "#1f2233"], + "progressbar_border": ["#fa00d0", "#0d101f"], + "slider": ["#fa00d0", "#fa00d0"], + "slider_progress": ["#0d101f", "#0d101f"], + "slider_button": ["#fa00d0", "#fa00d0"], + "slider_button_hover": ["#e46bff", "#fa00d0"], + "switch": ["#7681be", "#1f2233"], "switch_progress": ["#00e6c3", "#00e6c3"], - "switch_button": ["#2e324a", "#2e324a"], - "switch_button_hover": ["#2e324a", "#2e324a"], - "optionmenu_button": ["#36719F", "#144870"], - "optionmenu_button_hover": ["#27577D", "#203A4F"], - "combobox_border": ["#979DA2", "#565B5E"], - "combobox_button_hover": ["#6E7174", "#7A848D"], - "dropdown_color": ["gray90", "gray20"], - "dropdown_hover": ["gray75", "gray28"], - "dropdown_text": ["gray10", "#DCE4EE"], - "scrollbar_button": ["gray55", "gray41"], - "scrollbar_button_hover": ["gray40", "gray53"] + "switch_button": ["#525983", "#2e324a"], + "switch_button_hover": ["#fa00d0", "#2e324a"], + "optionmenu_button": ["#525983", "#080b12"], + "optionmenu_button_hover": ["#fa00d0", "#080b12"], + "combobox_border": ["#525983", "#080b12"], + "combobox_button_hover": ["#fa00d0", "#fa00d0"], + "dropdown_color": ["#dee2e7", "#212435"], + "dropdown_hover": ["#fa00d0", "#fa00d0"], + "dropdown_text": ["#0c0e14", "#cdc8ce"], + "scrollbar_button": ["#fa00d0", "#fa00d0"], + "scrollbar_button_hover": ["#9b45ff", "#9b45ff"] }, "text": { "macOS": { @@ -53,16 +54,16 @@ }, "shape": { "button_corner_radius": 8, - "button_border_width": 2, + "button_border_width": 1, "checkbox_corner_radius": 7, - "checkbox_border_width": 3, + "checkbox_border_width": 1, "radiobutton_corner_radius": 1000, - "radiobutton_border_width_unchecked": 3, + "radiobutton_border_width_unchecked": 2, "radiobutton_border_width_checked": 6, - "entry_border_width": 2, + "entry_border_width": 1, "frame_corner_radius": 10, - "frame_border_width": 2, - "label_corner_radius": 0, + "frame_border_width": 1, + "label_corner_radius": 3, "progressbar_border_width": 2, "progressbar_corner_radius": 1000, "slider_border_width": 6, @@ -72,8 +73,6 @@ "switch_border_width": 3, "switch_corner_radius": 1000, "switch_button_corner_radius": 1000, - "switch_button_length": 2, - "scrollbar_corner_radius": 1000, - "scrollbar_border_spacing": 4 + "switch_button_length": 2 } } From 4516a5edb1ec97ea4a2459b76870f5b26087c26c Mon Sep 17 00:00:00 2001 From: FTE <2336812+felipetesc@users.noreply.github.com> Date: Tue, 2 Aug 2022 14:51:28 -0300 Subject: [PATCH 2/4] added white version of sweetkind added white version of sweetkind --- customtkinter/assets/themes/sweetkind.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/customtkinter/assets/themes/sweetkind.json b/customtkinter/assets/themes/sweetkind.json index 27d91e0..178fec1 100644 --- a/customtkinter/assets/themes/sweetkind.json +++ b/customtkinter/assets/themes/sweetkind.json @@ -3,7 +3,6 @@ "window_bg_color": ["#ebf0f5", "#181b28"], "button": ["#e46bff", "#212435"], "button_hover": ["#8593d6", "#171926"], - "button_active": ["#9b45ff", "#9b45ff"], "button_border": ["#525983", "#080b12"], "checkbox_border": ["#01e9c4", "#01e9c4"], "checkmark": ["#01e9c4", "#01e9c4"], @@ -73,6 +72,8 @@ "switch_border_width": 3, "switch_corner_radius": 1000, "switch_button_corner_radius": 1000, - "switch_button_length": 2 + "switch_button_length": 2, + "scrollbar_corner_radius": 1000, + "scrollbar_border_spacing": 4 } } From 013e186ca661c8519f71840c49f2ee1776f5f3e3 Mon Sep 17 00:00:00 2001 From: splewdge <110092160+splewdge@users.noreply.github.com> Date: Thu, 4 Aug 2022 12:27:27 +0100 Subject: [PATCH 3/4] Update ctk_button.py --- customtkinter/widgets/ctk_button.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/customtkinter/widgets/ctk_button.py b/customtkinter/widgets/ctk_button.py index 0e8cfb9..ceb64f6 100644 --- a/customtkinter/widgets/ctk_button.py +++ b/customtkinter/widgets/ctk_button.py @@ -362,7 +362,7 @@ class CTkButton(CTkBaseClass): def clicked(self, event=None): if self.command is not None: - if self.state is not tkinter.DISABLED: + if self.state != tkinter.DISABLED: # click animation: change color with .on_leave() and back to normal after 100ms with click_animation() self.on_leave() From 46b20d6605e65bdc0e999d7b0f6f402fecda7c5f Mon Sep 17 00:00:00 2001 From: Tom Schimansky Date: Fri, 5 Aug 2022 14:23:06 +0200 Subject: [PATCH 4/4] fixed bug in CTkBaseClass #354 --- customtkinter/widgets/widget_base_class.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/customtkinter/widgets/widget_base_class.py b/customtkinter/widgets/widget_base_class.py index cfd59e7..303a7d7 100644 --- a/customtkinter/widgets/widget_base_class.py +++ b/customtkinter/widgets/widget_base_class.py @@ -153,7 +153,7 @@ class CTkBaseClass(tkinter.Frame): # if fg_color of master is None, try to retrieve fg_color from master of master elif hasattr(master_widget.master, "master"): - return self.detect_color_of_master(self.master.master) + return self.detect_color_of_master(master_widget.master) elif isinstance(master_widget, (ttk.Frame, ttk.LabelFrame, ttk.Notebook, ttk.Label)): # master is ttk widget try: