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

Skip to content

Commit f230dfb

Browse files
authored
Merge pull request #20476 from richardsheridan/tk_font_root
give Font a root widget
2 parents 4c400d7 + d4bcdd0 commit f230dfb

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
@@ -542,7 +542,7 @@ def __init__(self, canvas, window, *, pack_toolbar=True):
542542
if tooltip_text is not None:
543543
ToolTip.createToolTip(button, tooltip_text)
544544

545-
self._label_font = tkinter.font.Font(size=10)
545+
self._label_font = tkinter.font.Font(root=window, size=10)
546546

547547
# This filler item ensures the toolbar is always at least two text
548548
# lines high. Otherwise the canvas gets redrawn as the mouse hovers

0 commit comments

Comments
 (0)