fixed pointinghand bug in CTkCheckBox

This commit is contained in:
Tom Schimansky 2021-10-11 13:28:21 +02:00
parent 3deeb2a1b6
commit 7b7f669c49
2 changed files with 6 additions and 4 deletions

View File

@ -69,7 +69,7 @@ def update_appearance_mode():
if isinstance(AppearanceModeTracker.system_mode_listener, SystemAppearanceModeListenerNoThread): if isinstance(AppearanceModeTracker.system_mode_listener, SystemAppearanceModeListenerNoThread):
AppearanceModeTracker.system_mode_listener.update() AppearanceModeTracker.system_mode_listener.update()
else: else:
sys.stderr.write("WARNING (customtkinter.update_theme): no need to call update_theme, because " + sys.stderr.write("WARNING (customtkinter.update_theme): no need to call update_appearance_mode, because " +
"customtkinter is constantly searching for a mode change in a background thread.\n") "customtkinter is constantly searching for a mode change in a background thread.\n")

View File

@ -80,10 +80,12 @@ class CTkCheckBox(tkinter.Frame):
self.canvas = tkinter.Canvas(master=self, self.canvas = tkinter.Canvas(master=self,
highlightthicknes=0, highlightthicknes=0,
width=self.width, width=self.width,
height=self.height, height=self.height)
cursor="pointinghand")
self.canvas.pack(side='left') self.canvas.pack(side='left')
if sys.platform == "darwin" and self.state == tkinter.NORMAL:
self.canvas.configure(cursor="pointinghand")
if self.hover is True: if self.hover is True:
self.canvas.bind("<Enter>", self.on_enter) self.canvas.bind("<Enter>", self.on_enter)
self.canvas.bind("<Leave>", self.on_leave) self.canvas.bind("<Leave>", self.on_leave)