ENH: Optimize Dialog Positon Again 2

Change-Id: I3f2af3ee696415d07fc926596e110d5874dc579c
(cherry picked from commit 73baa282ab7a98df9cde95703da096c6a02eac61)
This commit is contained in:
zorro.zhang 2023-03-20 19:40:50 +08:00 committed by Lane.Wei
parent b2e4935b6f
commit d4907f0e4f
2 changed files with 4 additions and 2 deletions

View file

@ -78,7 +78,8 @@ GuideFrame::GuideFrame(GUI_App *pGUI, long style)
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);
wxPoint tmpPT((screenwidth - pSize.x) / 2, MaxY);
Move(tmpPT);
#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) {