Fix Preferences dialog sizing on multi monitor setups (#5820)

This commit is contained in:
Ocraftyone 2024-07-28 12:15:16 -04:00 committed by GitHub
parent 83a9b2513a
commit c08126703c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1004,7 +1004,7 @@ void PreferencesDialog::create()
SetSizer(main_sizer);
Layout();
Fit();
int screen_height = wxGetDisplaySize().GetY();
int screen_height = wxDisplay(m_parent).GetClientArea().GetHeight();
if (this->GetSize().GetY() > screen_height)
this->SetSize(this->GetSize().GetX() + FromDIP(40), screen_height * 4 / 5);