diff --git a/customtkinter/customtkinter_checkbox.py b/customtkinter/customtkinter_checkbox.py index 1ab99fc..4698214 100644 --- a/customtkinter/customtkinter_checkbox.py +++ b/customtkinter/customtkinter_checkbox.py @@ -328,9 +328,7 @@ class CTkCheckBox(tkinter.Frame): def select(self, from_variable_callback=False): self.check_state = True - self.canvas.itemconfig("inner_parts", - fill=CTkThemeManager.single_color(self.fg_color, self.appearance_mode), - outline=CTkThemeManager.single_color(self.fg_color, self.appearance_mode)) + self.draw() if self.function is not None: self.function() @@ -342,9 +340,7 @@ class CTkCheckBox(tkinter.Frame): def deselect(self, from_variable_callback=False): self.check_state = False - self.canvas.itemconfig("inner_parts", - fill=CTkThemeManager.single_color(self.bg_color, self.appearance_mode), - outline=CTkThemeManager.single_color(self.bg_color, self.appearance_mode)) + self.draw() if self.function is not None: self.function() diff --git a/customtkinter/customtkinter_draw_engine.py b/customtkinter/customtkinter_draw_engine.py index ac0f52d..242f4dc 100644 --- a/customtkinter/customtkinter_draw_engine.py +++ b/customtkinter/customtkinter_draw_engine.py @@ -639,7 +639,7 @@ class CTkDrawEngine: requires_recoloring = False if self._rendering_method == "polygon_shapes" or self._rendering_method == "circle_shapes": - x, y, radius = width / 2, height / 2, size / 2.2 + x, y, radius = width / 2, height / 2, size / 2.8 if not self._canvas.find_withtag("checkmark"): self._canvas.create_line(0, 0, 0, 0, tags=("checkmark", "create_line"), width=round(height / 8), joinstyle=tkinter.MITER, capstyle=tkinter.ROUND) self._canvas.tag_raise("checkmark") @@ -647,8 +647,8 @@ class CTkDrawEngine: self._canvas.coords("checkmark", x + radius, y - radius, - x - radius / 4, y + radius, - x - radius, y + radius / 4) + x - radius / 4, y + radius * 0.8, + x - radius, y + radius / 6) elif self._rendering_method == "font_shapes": if not self._canvas.find_withtag("checkmark"): self._canvas.create_text(0, 0, text="Z", font=("CustomTkinter_shapes_font", -size), tags=("checkmark", "create_text"), anchor=tkinter.CENTER) diff --git a/examples/complex_example.py b/examples/complex_example.py index 037091c..38129f8 100644 --- a/examples/complex_example.py +++ b/examples/complex_example.py @@ -6,8 +6,6 @@ import sys customtkinter.set_appearance_mode("System") # Modes: "System" (standard), "Dark", "Light" customtkinter.set_default_color_theme("blue") # Themes: "blue" (standard), "green", "dark-blue" -customtkinter.CTkSettings.preferred_drawing_method = "circle_shapes" - class App(customtkinter.CTk): @@ -187,6 +185,7 @@ class App(customtkinter.CTk): self.slider_1.set(0.2) self.slider_2.set(0.7) self.progressbar.set(0.5) + self.check_box_2.select() def button_event(self): print("Button pressed")