GS: Track DPI change events

This commit is contained in:
TellowKrinkle 2021-10-17 00:27:17 -05:00 committed by tellowkrinkle
parent 095ff20e2b
commit 85934dcbe2
2 changed files with 5 additions and 2 deletions

View File

@ -212,6 +212,9 @@ GSPanel::GSPanel( wxWindow* parent )
}
Bind(wxEVT_SIZE, &GSPanel::OnResize, this);
#if wxCHECK_VERSION(3, 1, 3)
Bind(wxEVT_DPI_CHANGED, &GSPanel::OnResize, this);
#endif
Bind(wxEVT_KEY_UP, &GSPanel::OnKeyDownOrUp, this);
Bind(wxEVT_KEY_DOWN, &GSPanel::OnKeyDownOrUp, this);
@ -349,7 +352,7 @@ std::optional<WindowInfo> GSPanel::GetWindowInfo()
return ret;
}
void GSPanel::OnResize(wxSizeEvent& event)
void GSPanel::OnResize(wxEvent& event)
{
if( IsBeingDeleted() ) return;
event.Skip();

View File

@ -61,7 +61,7 @@ public:
protected:
void AppStatusEvent_OnSettingsApplied();
void OnResize(wxSizeEvent& event);
void OnResize(wxEvent& event);
void OnMouseEvent( wxMouseEvent& evt );
void OnHideMouseTimeout( wxTimerEvent& evt );
void OnKeyDownOrUp( wxKeyEvent& evt );