From 6629ce6144ecbb38961b6f507bcd0022eb85940f Mon Sep 17 00:00:00 2001 From: daniilS Date: Sat, 1 Jan 2022 23:56:37 +0000 Subject: [PATCH] Prevent tooltips from overlapping buttons in NavigationToolbar2Tk --- lib/matplotlib/backends/_backend_tk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/backends/_backend_tk.py b/lib/matplotlib/backends/_backend_tk.py index a5518ec11667..fe2668e0994b 100644 --- a/lib/matplotlib/backends/_backend_tk.py +++ b/lib/matplotlib/backends/_backend_tk.py @@ -758,7 +758,7 @@ def showtip(self, text): if self.tipwindow or not self.text: return x, y, _, _ = self.widget.bbox("insert") - x = x + self.widget.winfo_rootx() + 27 + x = x + self.widget.winfo_rootx() + self.widget.winfo_width() y = y + self.widget.winfo_rooty() self.tipwindow = tw = tk.Toplevel(self.widget) tw.wm_overrideredirect(1)