ENH: Optimize Dialog Position
Change-Id: I6795d6d0f979ff379b8c4f1f010eeaba6aa339b1 (cherry picked from commit 2ce1e9a9f3141bc2149a4d1f62656f1a3d57b26e)
This commit is contained in:
parent
5ec2e91b9d
commit
31667d04b0
2 changed files with 8 additions and 6 deletions
|
@ -75,11 +75,10 @@ GuideFrame::GuideFrame(GUI_App *pGUI, long style)
|
|||
wxSize pSize = FromDIP(wxSize(820, 660));
|
||||
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);
|
||||
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);
|
||||
#ifdef __WXMSW__
|
||||
this->Bind(wxEVT_CHAR_HOOK, [this](wxKeyEvent& e) {
|
||||
if ((m_page == BBL_FILAMENT_ONLY || m_page == BBL_MODELS_ONLY) && e.GetKeyCode() == WXK_ESCAPE) {
|
||||
|
|
|
@ -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 = "";
|
||||
|
|
Loading…
Reference in a new issue