FIX:fixed the menu popup in the wrong position when multiple screens

Change-Id: I1cb1124b2c1898fd650ec0eb750fbfc9e36bee72
This commit is contained in:
Tao Wang 2022-10-25 17:41:13 +08:00 committed by Lane.Wei
parent c5811178ae
commit 24ce050a91

View file

@ -539,7 +539,7 @@ void BBLTopbar::OnFileToolItem(wxAuiToolBarEvent& evt)
tb->SetToolSticky(evt.GetId(), true); tb->SetToolSticky(evt.GetId(), true);
if (!m_skip_popup_file_menu) { if (!m_skip_popup_file_menu) {
this->PopupMenu(m_file_menu, wxPoint(0, this->GetSize().GetHeight() - 2)); this->PopupMenu(m_file_menu, wxPoint(FromDIP(1), this->GetSize().GetHeight() - 2));
} }
else { else {
m_skip_popup_file_menu = false; m_skip_popup_file_menu = false;
@ -556,7 +556,7 @@ void BBLTopbar::OnDropdownToolItem(wxAuiToolBarEvent& evt)
tb->SetToolSticky(evt.GetId(), true); tb->SetToolSticky(evt.GetId(), true);
if (!m_skip_popup_dropdown_menu) { if (!m_skip_popup_dropdown_menu) {
PopupMenu(&m_top_menu, wxPoint(0, this->GetSize().GetHeight() - 2)); PopupMenu(&m_top_menu, wxPoint(FromDIP(1), this->GetSize().GetHeight() - 2));
} }
else { else {
m_skip_popup_dropdown_menu = false; m_skip_popup_dropdown_menu = false;