ENH: Optimize Dialog Position

Change-Id: I6795d6d0f979ff379b8c4f1f010eeaba6aa339b1
(cherry picked from commit 2ce1e9a9f3141bc2149a4d1f62656f1a3d57b26e)
This commit is contained in:
zorro.zhang 2023-03-20 16:12:35 +08:00 committed by Lane.Wei
parent 5ec2e91b9d
commit 31667d04b0
2 changed files with 8 additions and 6 deletions

View file

@ -109,7 +109,10 @@ ZUserLogin::ZUserLogin() : wxDialog((wxWindow *) (wxGetApp().mainframe), wxID_AN
wxSize pSize = FromDIP(wxSize(650, 840));
SetSize(pSize);
CenterOnParent();
int screenheight = wxSystemSettings::GetMetric(wxSYS_SCREEN_Y, NULL);
int screenwidth = wxSystemSettings::GetMetric(wxSYS_SCREEN_X, NULL);
int MaxY = (screenheight - pSize.y) > 0 ? (screenheight - pSize.y) / 2 : 0;
MoveWindow(this->m_hWnd, (screenwidth - pSize.x) / 2, MaxY, pSize.x, pSize.y, TRUE);
//Param
m_AutotestToken = "";