Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions customtkinter/windows/widgets/core_rendering/ctk_canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ def create_aa_circle(self, x_pos: int, y_pos: int, radius: int, angle: int = 0,
return circle_1

def coords(self, tag_or_id, *args):

if type(tag_or_id) == str and "ctk_aa_circle_font_element" in self.gettags(tag_or_id):
coords_id = self.find_withtag(tag_or_id)[0] # take the lowest id for the given tag
super().coords(coords_id, *args[:2])
Expand All @@ -96,7 +95,10 @@ def coords(self, tag_or_id, *args):
super().itemconfigure(tag_or_id, font=("CustomTkinter_shapes_font", -args[2] * 2), text=self._get_char_from_radius(args[2]))

else:
super().coords(tag_or_id, *args)
coords = super().coords(tag_or_id, *args)
if not coords:
return [0, 0, 0, 0] # Return default coordinates if None
return coords

def itemconfig(self, tag_or_id, *args, **kwargs):
kwargs_except_outline = kwargs.copy()
Expand Down