Correct WX check for DPI handler calls

This commit is contained in:
Seth Hillbrand 2022-06-27 13:34:39 -07:00
parent 14886e426b
commit 89eeba3312
2 changed files with 4 additions and 4 deletions

View File

@ -41,7 +41,7 @@ WX_GRID::WX_GRID( wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxS
// Make sure the GUI font scales properly on GTK // Make sure the GUI font scales properly on GTK
SetDefaultCellFont( KIUI::GetControlFont( this ) ); SetDefaultCellFont( KIUI::GetControlFont( this ) );
#if wxCHECK_VERSION( 3, 1, 0 ) #if wxCHECK_VERSION( 3, 1, 3 )
Connect( wxEVT_DPI_CHANGED, wxDPIChangedEventHandler( WX_GRID::onDPIChanged ), nullptr, this ); Connect( wxEVT_DPI_CHANGED, wxDPIChangedEventHandler( WX_GRID::onDPIChanged ), nullptr, this );
#endif #endif
@ -53,14 +53,14 @@ WX_GRID::~WX_GRID()
if( m_weOwnTable ) if( m_weOwnTable )
DestroyTable( GetTable() ); DestroyTable( GetTable() );
#if wxCHECK_VERSION( 3, 1, 0 ) #if wxCHECK_VERSION( 3, 1, 3 )
Disconnect( wxEVT_DPI_CHANGED, wxDPIChangedEventHandler( WX_GRID::onDPIChanged ), nullptr, this ); Disconnect( wxEVT_DPI_CHANGED, wxDPIChangedEventHandler( WX_GRID::onDPIChanged ), nullptr, this );
#endif #endif
} }
#if wxCHECK_VERSION( 3, 1, 0 ) #if wxCHECK_VERSION( 3, 1, 3 )
void WX_GRID::onDPIChanged(wxDPIChangedEvent& aEvt) void WX_GRID::onDPIChanged(wxDPIChangedEvent& aEvt)
{ {
/// This terrible hack is a way to avoid the incredibly disruptive resizing of grids that happens on Macs /// This terrible hack is a way to avoid the incredibly disruptive resizing of grids that happens on Macs

View File

@ -122,7 +122,7 @@ protected:
void onGridColMove( wxGridEvent& aEvent ); void onGridColMove( wxGridEvent& aEvent );
void onGridCellSelect( wxGridEvent& aEvent ); void onGridCellSelect( wxGridEvent& aEvent );
#if wxCHECK_VERSION( 3, 1, 0 ) #if wxCHECK_VERSION( 3, 1, 3 )
void onDPIChanged(wxDPIChangedEvent& event); void onDPIChanged(wxDPIChangedEvent& event);
#endif #endif