FIX:fixed popup wrong pos of the print menu on multiple displays

Change-Id: I9712244df4e0df9dcb5beedf4dd36e3a06fa9db6
This commit is contained in:
Tao Wang 2022-11-26 12:52:06 +08:00 committed by Lane.Wei
parent b81a26d019
commit ab49516ec1
1 changed files with 5 additions and 1 deletions

View File

@ -42,8 +42,12 @@ bool SidePopup::Show( bool show )
void SidePopup::Popup(wxWindow* focus)
{
Create();
int screenwidth = wxSystemSettings::GetMetric(wxSYS_SCREEN_X,NULL);
auto drect = wxDisplay(GetParent()).GetGeometry();
int screenwidth = drect.x + drect.width;
//int screenwidth = wxSystemSettings::GetMetric(wxSYS_SCREEN_X,NULL);
int max_width = 0;
for (auto btn : btn_list)
{
max_width = std::max(btn->GetMinSize().x, max_width);