pcbnew: Add toolbar buttons for action plugins

Allows optional toolbar buttons for action plugins.
This commit is contained in:
qu1ck
2018-08-26 19:39:27 -07:00
committed by Seth Hillbrand
parent 90788a5a72
commit 72f87861bb
21 changed files with 1664 additions and 213 deletions
+19
View File
@@ -144,6 +144,25 @@ wxBitmap KiScaledBitmap( BITMAP_DEF aBitmap, EDA_BASE_FRAME* aWindow )
}
wxBitmap KiScaledBitmap( const wxBitmap& aBitmap, EDA_BASE_FRAME* aWindow )
{
const int scale = get_scale_factor( aWindow );
if( scale == 4)
{
return wxBitmap( aBitmap );
}
else
{
wxImage image = aBitmap.ConvertToImage();
image.Rescale( scale * image.GetWidth() / 4, scale * image.GetHeight() / 4,
wxIMAGE_QUALITY_BILINEAR );
return wxBitmap( image );
}
}
void KiScaledSeparator( wxAuiToolBar* aToolbar, EDA_BASE_FRAME* aWindow )
{
const int scale = get_scale_factor( aWindow );