Skip to content

Commit 3523f9e

Browse files
committed
a couple more GetSizeTuple uses and a GetPositionTuple
1 parent af9deb3 commit 3523f9e

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

lib/matplotlib/backends/backend_wx.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -1461,8 +1461,12 @@ def Destroy(self):
14611461

14621462
def _onMenuButton(self, evt):
14631463
"""Handle menu button pressed."""
1464-
x, y = self.GetPositionTuple()
1465-
w, h = self.GetSizeTuple()
1464+
if wxc.is_phoenix:
1465+
x, y = self.GetPosition()
1466+
w, h = self.GetSize()
1467+
else:
1468+
x, y = self.GetPositionTuple()
1469+
w, h = self.GetSizeTuple()
14661470
self.PopupMenuXY(self._menu, x, y + h - 4)
14671471
# When menu returned, indicate selection in button
14681472
evt.Skip()
@@ -1783,7 +1787,10 @@ def OnPrintPage(self, page):
17831787
(ppw, pph) = self.GetPPIPrinter() # printer's pixels per in
17841788
(pgw, pgh) = self.GetPageSizePixels() # page size in pixels
17851789
(dcw, dch) = dc.GetSize()
1786-
(grw, grh) = self.canvas.GetSizeTuple()
1790+
if wxc.is_phoenix:
1791+
(grw, grh) = self.canvas.GetSize()
1792+
else:
1793+
(grw, grh) = self.canvas.GetSizeTuple()
17871794

17881795
# save current figure dpi resolution and bg color,
17891796
# so that we can temporarily set them to the dpi of

0 commit comments

Comments
 (0)