Streamline Mac patches.

This commit is contained in:
Jeff Young 2023-07-17 22:07:36 +01:00
parent f23f75866f
commit fa0338a9e6
2 changed files with 4 additions and 5 deletions

View File

@ -141,21 +141,20 @@ void LAYER_BOX_SELECTOR::ResyncBitmapOnly()
} }
#ifdef __WXMAC__
void LAYER_BOX_SELECTOR::onKeyDown( wxKeyEvent& aEvent ) void LAYER_BOX_SELECTOR::onKeyDown( wxKeyEvent& aEvent )
{ {
#ifdef __WXOSX_MAC__
if( aEvent.GetKeyCode() == WXK_ESCAPE && IsPopupShown() ) if( aEvent.GetKeyCode() == WXK_ESCAPE && IsPopupShown() )
{ {
Dismiss(); Dismiss();
return; return;
} }
#endif
aEvent.Skip(); aEvent.Skip();
} }
#ifdef __WXMAC__
void LAYER_BOX_SELECTOR::OnDrawBackground( wxDC& dc, const wxRect& rect, int item, int flags) const void LAYER_BOX_SELECTOR::OnDrawBackground( wxDC& dc, const wxRect& rect, int item, int flags) const
{ {
if( ( flags & wxODCB_PAINTING_CONTROL ) && !IsEnabled() ) if( ( flags & wxODCB_PAINTING_CONTROL ) && !IsEnabled() )
@ -178,4 +177,5 @@ void LAYER_BOX_SELECTOR::OnDrawBackground( wxDC& dc, const wxRect& rect, int ite
wxBitmapComboBox::OnDrawBackground( dc, rect, item, flags ); wxBitmapComboBox::OnDrawBackground( dc, rect, item, flags );
} }
#endif #endif

View File

@ -85,9 +85,8 @@ public:
void ResyncBitmapOnly(); void ResyncBitmapOnly();
private: private:
void onKeyDown( wxKeyEvent& aEvent );
#ifdef __WXMAC__ #ifdef __WXMAC__
void onKeyDown( wxKeyEvent& aEvent );
void OnDrawBackground( wxDC& dc, const wxRect& rect, int item, int flags) const override; void OnDrawBackground( wxDC& dc, const wxRect& rect, int item, int flags) const override;
#endif #endif
}; };