Do not limit the max window size (#3149)

Do not limit the max window size (#2889)

Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
Noisyfox 2023-12-20 21:09:13 +08:00 committed by GitHub
parent eeef52bf5d
commit 6bb0d5ec30
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 26 deletions

View file

@ -531,15 +531,6 @@ void BBLTopbar::OnFullScreen(wxAuiToolBarEvent& event)
m_frame->Restore();
}
else {
wxDisplay display(this);
auto size = display.GetClientArea().GetSize();
#ifdef __WXMSW__
HWND hWnd = m_frame->GetHandle();
RECT borderThickness;
SetRectEmpty(&borderThickness);
AdjustWindowRectEx(&borderThickness, GetWindowLongPtr(hWnd, GWL_STYLE), FALSE, 0);
m_frame->SetMaxSize(size + wxSize{-borderThickness.left + borderThickness.right, -borderThickness.top + borderThickness.bottom});
#endif // __WXMSW__
m_normalRect = m_frame->GetRect();
m_frame->Maximize();
}