8000 Add missing spacer in tk toolmanager toolbar. by anntzer · Pull Request #26128 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Add missing spacer in tk toolmanager toolbar. #26128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/matplotlib/backends/_backend_tk.py
Original file line number Diff line number Diff line change
Expand Up @@ -972,6 +972,13 @@ def __init__(self, toolmanager, window=None):
width=int(width), height=int(height),
borderwidth=2)
self._label_font = tkinter.font.Font(size=10)
# This filler item ensures the toolbar is always at least two text
# lines high. Otherwise the canvas gets redrawn as the mouse hovers
# over images because those use two-line messages which resize the
# toolbar.
label = tk.Label(master=self, font=self._label_font,
text='\N{NO-BREAK SPACE}\n\N{NO-BREAK SPACE}')
label.pack(side=tk.RIGHT)
self._message = tk.StringVar(master=self)
self._message_label = tk.Label(master=self, font=self._label_font,
textvariable=self._message)
Expand Down
0