Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Added spacer to Tk toolbar #7442

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
Nov 12, 2016
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
10 changes: 8 additions & 2 deletions 10 lib/matplotlib/backends/backend_tkagg.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,12 @@ def _Button(self, text, file, command, extension='.gif'):
b.pack(side=Tk.LEFT)
return b

def _Spacer(self):
# Buttons are 30px high, so make this 26px tall with padding to center it
s = Tk.Frame(master=self, height=26, relief=Tk.RIDGE, pady=2, bg="DarkGray")
s.pack(side=Tk.LEFT, padx=5)
return s

def _init_toolbar(self):
xmin, xmax = self.canvas.figure.bbox.intervalx
height, width = 50, xmax-xmin
Expand All @@ -761,8 +767,8 @@ def _init_toolbar(self):

for text, tooltip_text, image_file, callback in self.toolitems:
if text is None:
# spacer, unhandled in Tk
pass
# Add a spacer -- we don't need to use the return value for anything
self._Spacer()
else:
button = self._Button(text=text, file=image_file,
command=getattr(self, callback))
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.