Skip to content

Commit

Permalink
fix: tooltip background wrong color, update size
Browse files Browse the repository at this point in the history
Use customtkinter instead of tkinter for tooltip, which will let it
adapt to the selected color settings.
  • Loading branch information
shaun_heng committed May 28, 2024
1 parent 1cddf9e commit 7a6bf55
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions visual_comparison/utils/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ def showtip(self, text):
x, y, cx, cy = self.widget.bbox("insert")
x = x + self.widget.winfo_rootx()
y = y + cy + self.widget.winfo_rooty()
self.tip_window = tw = tkinter.Toplevel(self.widget)
self.tip_window = tw = customtkinter.CTkToplevel(self.widget)
tw.wm_overrideredirect(1)
tw.wm_geometry("+%d+%d" % (x, y))
label = tkinter.Label(tw, text=self.text, justify=tkinter.LEFT, background="#ffffe0", relief=tkinter.SOLID, borderwidth=1, font=("tahoma", "8", "normal"))
label.pack(ipadx=1)
label = customtkinter.CTkLabel(tw, text=self.text)
label.pack(padx=5)

def hidetip(self):
tw = self.tip_window
Expand Down

0 comments on commit 7a6bf55

Please sign in to comment.