FIX: windows position after Maximize on Win32

Change-Id: I02d491e819369009ae188a1dd4cfe98900e52c6b
This commit is contained in:
chunmao.guo 2022-07-25 20:07:06 +08:00 committed by Lane.Wei
parent 18920df354
commit 45e7443bb3
1 changed files with 6 additions and 0 deletions

View File

@ -352,6 +352,12 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, BORDERLESS_FRAME_
e.Skip();
});
setMaxSize();
this->Bind(wxEVT_MAXIMIZE, [this](auto &e) {
wxDisplay display(wxDisplay::GetFromWindow(this));
auto pos = display.GetClientArea().GetPosition();
Move(pos - wxPoint{8, 8});
e.Skip();
});
#endif // WIN32
// BBS
Fit();