|
|
|
@ -36,7 +36,7 @@ |
|
|
|
const int BUTTON_SEPARATION = 5; |
|
|
|
|
|
|
|
// Buttons are larger than images by this amount
|
|
|
|
const int BUTTON_EXPANSION = 5; |
|
|
|
const int BUTTON_EXPANSION = 6; |
|
|
|
|
|
|
|
LAUNCHER_PANEL::LAUNCHER_PANEL( wxWindow* parent ) : |
|
|
|
wxPanel( parent, wxID_ANY ) |
|
|
|
@ -51,6 +51,11 @@ int LAUNCHER_PANEL::GetPanelHeight() const |
|
|
|
return m_height + 2 * BUTTON_SEPARATION; |
|
|
|
} |
|
|
|
|
|
|
|
int LAUNCHER_PANEL::GetPanelWidth() const |
|
|
|
{ |
|
|
|
return m_width + BUTTON_SEPARATION; |
|
|
|
} |
|
|
|
|
|
|
|
/**
|
|
|
|
* Add application launcher buttons |
|
|
|
* e.g. Eeschema, CvPcb, Pcbnew, GerbView |
|
|
|
@ -106,12 +111,14 @@ void LAUNCHER_PANEL::CreateCommandToolbar() |
|
|
|
*/ |
|
|
|
void LAUNCHER_PANEL::AddButton( wxWindowID aId, const wxBitmap& aBitmap, wxString aToolTip ) |
|
|
|
{ |
|
|
|
wxSize buttSize( aBitmap.GetWidth() + BUTTON_EXPANSION, |
|
|
|
aBitmap.GetHeight() + BUTTON_EXPANSION ); |
|
|
|
wxSize buttSize( aBitmap.GetWidth() + 2 * BUTTON_EXPANSION, |
|
|
|
aBitmap.GetHeight() + 2 * BUTTON_EXPANSION ); |
|
|
|
|
|
|
|
if( m_height < buttSize.y ) |
|
|
|
m_height = buttSize.y; |
|
|
|
|
|
|
|
m_width += buttSize.x + BUTTON_SEPARATION; |
|
|
|
|
|
|
|
auto btn = new wxBitmapButton( this, aId, aBitmap, wxDefaultPosition, buttSize ); |
|
|
|
|
|
|
|
btn->SetToolTip( aToolTip ); |
|
|
|
|