Fix position of label window in wxStaticBox after DPI change

Fixes #23740
This commit is contained in:
Maarten Bent 2023-08-05 21:44:30 +02:00
parent a4dec24c6d
commit d847f3b039
No known key found for this signature in database
GPG key ID: 58AAEE3F4A4FD070
2 changed files with 7 additions and 0 deletions

View file

@ -97,6 +97,8 @@ protected:
void OnPaint(wxPaintEvent& event); void OnPaint(wxPaintEvent& event);
virtual void MSWBeforeDPIChangedEvent(const wxDPIChangedEvent& event) override;
private: private:
void PositionLabelWindow(); void PositionLabelWindow();

View file

@ -366,6 +366,11 @@ WXLRESULT wxStaticBox::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPar
return wxControl::MSWWindowProc(nMsg, wParam, lParam); return wxControl::MSWWindowProc(nMsg, wParam, lParam);
} }
void wxStaticBox::MSWBeforeDPIChangedEvent(const wxDPIChangedEvent& WXUNUSED(event))
{
PositionLabelWindow();
}
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// static box drawing // static box drawing
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------