Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6629ce6

Browse files
committed
Prevent tooltips from overlapping buttons in NavigationToolbar2Tk
1 parent 3d91b3f commit 6629ce6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/_backend_tk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,7 @@ def showtip(self, text):
758758
if self.tipwindow or not self.text:
759759
return
760760
x, y, _, _ = self.widget.bbox("insert")
761-
x = x + self.widget.winfo_rootx() + 27
761+
x = x + self.widget.winfo_rootx() + self.widget.winfo_width()
762762
y = y + self.widget.winfo_rooty()
763763
self.tipwindow = tw = tk.Toplevel(self.widget)
764764
tw.wm_overrideredirect(1)

0 commit comments

Comments
 (0)