mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 20:10:08 +01:00
Use default position for PopupMenu in wx.lib.agw.aui.auibar.AuiDefaultToolBarArt
This commit is contained in:
@@ -1451,23 +1451,10 @@ class AuiDefaultToolBarArt(object):
|
||||
if items_added > 0 and item.GetKind() == ITEM_SEPARATOR:
|
||||
menuPopup.AppendSeparator()
|
||||
|
||||
# find out where to put the popup menu of window items
|
||||
pt = wx.GetMousePosition()
|
||||
pt = wnd.ScreenToClient(pt)
|
||||
|
||||
# find out the screen coordinate at the bottom of the tab ctrl
|
||||
cli_rect = wnd.GetClientRect()
|
||||
pt.y = cli_rect.y + cli_rect.height
|
||||
|
||||
cc = ToolbarCommandCapture()
|
||||
wnd.PushEventHandler(cc)
|
||||
|
||||
# Adjustments to get slightly better menu placement
|
||||
if wx.Platform == "__WXMAC__":
|
||||
pt.y += 5
|
||||
pt.x -= 5
|
||||
|
||||
wnd.PopupMenu(menuPopup, pt)
|
||||
wnd.PopupMenu(menuPopup)
|
||||
command = cc.GetCommandId()
|
||||
wnd.PopEventHandler(True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user