mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-07 06:57:36 -06:00
parent
712c28251c
commit
fe80dc6ca6
1 changed files with 0 additions and 28 deletions
|
@ -395,34 +395,6 @@ DPIFrame(NULL, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, BORDERLESS_FRAME_
|
||||||
update_layout();
|
update_layout();
|
||||||
sizer->SetSizeHints(this);
|
sizer->SetSizeHints(this);
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
auto setMaxSize = [this]() {
|
|
||||||
wxDisplay display(this);
|
|
||||||
auto size = display.GetClientArea().GetSize();
|
|
||||||
HWND hWnd = GetHandle();
|
|
||||||
RECT borderThickness;
|
|
||||||
SetRectEmpty(&borderThickness);
|
|
||||||
AdjustWindowRectEx(&borderThickness, GetWindowLongPtr(hWnd, GWL_STYLE), FALSE, 0);
|
|
||||||
SetMaxSize(size + wxSize{-borderThickness.left + borderThickness.right, -borderThickness.top + borderThickness.bottom});
|
|
||||||
};
|
|
||||||
this->Bind(wxEVT_DPI_CHANGED, [setMaxSize](auto & e) {
|
|
||||||
setMaxSize();
|
|
||||||
e.Skip();
|
|
||||||
});
|
|
||||||
setMaxSize();
|
|
||||||
// SetMaximize already position window at left/top corner, even if Windows Task Bar is at left side.
|
|
||||||
// Not known why, but fix it here
|
|
||||||
this->Bind(wxEVT_MAXIMIZE, [this](auto &e) {
|
|
||||||
wxDisplay display(this);
|
|
||||||
auto pos = display.GetClientArea().GetPosition();
|
|
||||||
HWND hWnd = GetHandle();
|
|
||||||
RECT borderThickness;
|
|
||||||
SetRectEmpty(&borderThickness);
|
|
||||||
AdjustWindowRectEx(&borderThickness, GetWindowLongPtr(hWnd, GWL_STYLE), FALSE, 0);
|
|
||||||
Move(pos + wxPoint{borderThickness.left, borderThickness.top});
|
|
||||||
e.Skip();
|
|
||||||
});
|
|
||||||
#endif // WIN32
|
|
||||||
// BBS
|
// BBS
|
||||||
Fit();
|
Fit();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue