8000 Merge remote-tracking branch 'upstream/v1.2.x' · matplotlib/matplotlib@de2b77c · GitHub
[go: up one dir, main page]

Skip to content

Commit de2b77c

Browse files
committed
Merge remote-tracking branch 'upstream/v1.2.x'
2 parents bf7b501 + 05d38ff commit de2b77c

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

lib/matplotlib/backends/backend_wx.py

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,21 +1330,14 @@ def __init__(self, num, fig):
13301330

13311331
if self.toolbar is not None:
13321332
self.toolbar.Realize()
1333-
if wx.Platform == '__WXMAC__':
1334-
# Mac platform (OSX 10.3, MacPython) does not seem to cope with
1335-
# having a toolbar in a sizer. This work-around gets the buttons
1336-
# back, but at the expense of having the toolbar at the top
1337-
self.SetToolBar(self.toolbar)
1338-
else:
1339-
# On Windows platform, default window size is incorrect, so set
1340-
# toolbar width to figure width.
1341-
tw, th = self.toolbar.GetSizeTuple()
1342-
fw, fh = self.canvas.GetSizeTuple()
1343-
# By adding toolbar in sizer, we are able to put it at the bottom
1344-
# of the frame - so appearance is closer to GTK version.
1345-
# As noted above, doesn't work for Mac.
1346-
self.toolbar.SetSize(wx.Size(fw, th))
1347-
self.sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND)
1333+
# On Windows platform, default window size is incorrect, so set
1334+
# toolbar width to figure width.
1335+
tw, th = self.toolbar.GetSizeTuple()
1336+
fw, fh = self.canvas.GetSizeTuple()
1337+
# By adding toolbar in sizer, we are able to put it at the bottom
1338+
# of the frame - so appearance is closer to GTK version.
1339+
self.toolbar.SetSize(wx.Size(fw, th))
1340+
self.sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND)
13481341
self.SetSizer(self.sizer)
13491342
self.Fit()
13501343

0 commit comments

Comments
 (0)
0