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

Skip to content

Commit 8fe6ba5

Browse files
committed
Prevent tooltips from overlapping buttons in NavigationToolbar2Tk
1 parent d1216c2 commit 8fe6ba5

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
@@ -757,7 +757,7 @@ def showtip(self, text):
757757
if self.tipwindow or not self.text:
758758
return
759759
x, y, _, _ = self.widget.bbox("insert")
760-
x = x + self.widget.winfo_rootx() + 27
760+
x = x + self.widget.winfo_rootx() + self.widget.winfo_width()
761761
y = y + self.widget.winfo_rooty()
762762
self.tipwindow = tw = tk.Toplevel(self.widget)
763763
tw.wm_overrideredirect(1)

0 commit comments

Comments
 (0)