Buffer bitmap buttons in pinmap for Mac
Mac bitmap buttons are not properly handled in wxWidgets, so the size of the bitmap needs more buffer space to the button edge or the image will clip
This commit is contained in:
parent
dd3323a86d
commit
d05df4a9d4
|
@ -137,7 +137,14 @@ void PANEL_SETUP_PINMAP::reBuildMatrixPanel()
|
|||
delete m_buttonList[ii][jj];
|
||||
wxBitmapButton* btn = new wxBitmapButton( m_matrixPanel, event_id,
|
||||
KiBitmap( bitmap_butt ), wxPoint( x, y ) );
|
||||
|
||||
// On the mac, the button sizes are reliably 4 pixels smaller (maybe due to corner rounding)
|
||||
// than can be displayed by the bitmap
|
||||
#ifdef __WXMAC__
|
||||
btn->SetSize( btn->GetSize().x + 8, btn->GetSize().y + 4 );
|
||||
#else
|
||||
btn->SetSize( btn->GetSize().x + 4, btn->GetSize().y );
|
||||
#endif
|
||||
m_buttonList[ii][jj] = btn;
|
||||
setDRCMatrixButtonState( m_buttonList[ii][jj], diag );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue