@@ -1461,8 +1461,12 @@ def Destroy(self):
1461
1461
1462
1462
def _onMenuButton (self , evt ):
1463
1463
"""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 ()
1466
1470
self .PopupMenuXY (self ._menu , x , y + h - 4 )
1467
1471
# When menu returned, indicate selection in button
1468
1472
evt .Skip ()
@@ -1783,7 +1787,10 @@ def OnPrintPage(self, page):
1783
1787
(ppw , pph ) = self .GetPPIPrinter () # printer's pixels per in
1784
1788
(pgw , pgh ) = self .GetPageSizePixels () # page size in pixels
1785
1789
(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 ()
1787
1794
1788
1795
# save current figure dpi resolution and bg color,
1789
1796
# so that we can temporarily set them to the dpi of
0 commit comments