More bitmap bundle comboboxes
This commit is contained in:
parent
059b043935
commit
f63c7806fd
|
@ -205,7 +205,7 @@ void GRID_CELL_ICON_TEXT_POPUP::Create( wxWindow* aParent, wxWindowID aId,
|
||||||
// note that the set of icons might be smaller than the set of labels if
|
// note that the set of icons might be smaller than the set of labels if
|
||||||
// the last label is <...>.
|
// the last label is <...>.
|
||||||
if( i < m_icons.size() && m_icons[ i ] != BITMAPS::INVALID_BITMAP )
|
if( i < m_icons.size() && m_icons[ i ] != BITMAPS::INVALID_BITMAP )
|
||||||
Combo()->Append( m_names[ i ], KiBitmap( m_icons[ i ] ) );
|
Combo()->Append( m_names[ i ], KiBitmapBundle( m_icons[ i ] ) );
|
||||||
else
|
else
|
||||||
Combo()->Append( m_names[ i ] );
|
Combo()->Append( m_names[ i ] );
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ DIALOG_LIB_SHAPE_PROPERTIES::DIALOG_LIB_SHAPE_PROPERTIES( SYMBOL_EDIT_FRAME* aPa
|
||||||
m_borderColorSwatch->SetSwatchBackground( schematicBackground );
|
m_borderColorSwatch->SetSwatchBackground( schematicBackground );
|
||||||
|
|
||||||
for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames )
|
for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames )
|
||||||
m_borderStyleCombo->Append( lineStyleDesc.name, KiBitmap( lineStyleDesc.bitmap ) );
|
m_borderStyleCombo->Append( lineStyleDesc.name, KiBitmapBundle( lineStyleDesc.bitmap ) );
|
||||||
|
|
||||||
m_borderStyleCombo->Append( DEFAULT_STYLE );
|
m_borderStyleCombo->Append( DEFAULT_STYLE );
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ DIALOG_LIB_TEXTBOX_PROPERTIES::DIALOG_LIB_TEXTBOX_PROPERTIES( SYMBOL_EDIT_FRAME*
|
||||||
m_borderColorSwatch->SetSwatchBackground( schematicBackground );
|
m_borderColorSwatch->SetSwatchBackground( schematicBackground );
|
||||||
|
|
||||||
for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames )
|
for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames )
|
||||||
m_borderStyleCombo->Append( lineStyleDesc.name, KiBitmap( lineStyleDesc.bitmap ) );
|
m_borderStyleCombo->Append( lineStyleDesc.name, KiBitmapBundle( lineStyleDesc.bitmap ) );
|
||||||
|
|
||||||
m_borderStyleCombo->Append( DEFAULT_STYLE );
|
m_borderStyleCombo->Append( DEFAULT_STYLE );
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ DIALOG_LINE_PROPERTIES::DIALOG_LINE_PROPERTIES( SCH_EDIT_FRAME* aParent,
|
||||||
SetInitialFocus( m_lineWidth );
|
SetInitialFocus( m_lineWidth );
|
||||||
|
|
||||||
for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames )
|
for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames )
|
||||||
m_typeCombo->Append( lineStyleDesc.name, KiBitmap( lineStyleDesc.bitmap ) );
|
m_typeCombo->Append( lineStyleDesc.name, KiBitmapBundle( lineStyleDesc.bitmap ) );
|
||||||
|
|
||||||
m_typeCombo->Append( DEFAULT_STYLE );
|
m_typeCombo->Append( DEFAULT_STYLE );
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ DIALOG_SHAPE_PROPERTIES::DIALOG_SHAPE_PROPERTIES( SCH_EDIT_FRAME* aParent, SCH_S
|
||||||
m_borderColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
|
m_borderColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
|
||||||
|
|
||||||
for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames )
|
for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames )
|
||||||
m_borderStyleCombo->Append( lineStyleDesc.name, KiBitmap( lineStyleDesc.bitmap ) );
|
m_borderStyleCombo->Append( lineStyleDesc.name, KiBitmapBundle( lineStyleDesc.bitmap ) );
|
||||||
|
|
||||||
m_borderStyleCombo->Append( DEFAULT_STYLE );
|
m_borderStyleCombo->Append( DEFAULT_STYLE );
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,8 @@ DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES( SCH_EDIT_FRAME* aParent, SCH_ITE
|
||||||
m_borderColorSwatch->SetSwatchBackground( schematicBackground );
|
m_borderColorSwatch->SetSwatchBackground( schematicBackground );
|
||||||
|
|
||||||
for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames )
|
for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames )
|
||||||
m_borderStyleCombo->Append( lineStyleDesc.name, KiBitmap( lineStyleDesc.bitmap ) );
|
m_borderStyleCombo->Append( lineStyleDesc.name,
|
||||||
|
KiBitmapBundle( lineStyleDesc.bitmap ) );
|
||||||
|
|
||||||
m_borderStyleCombo->Append( DEFAULT_STYLE );
|
m_borderStyleCombo->Append( DEFAULT_STYLE );
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ DIALOG_WIRE_BUS_PROPERTIES::DIALOG_WIRE_BUS_PROPERTIES( SCH_EDIT_FRAME* aParent,
|
||||||
SetInitialFocus( m_lineWidth );
|
SetInitialFocus( m_lineWidth );
|
||||||
|
|
||||||
for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames )
|
for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames )
|
||||||
m_typeCombo->Append( lineStyleDesc.name, KiBitmap( lineStyleDesc.bitmap ) );
|
m_typeCombo->Append( lineStyleDesc.name, KiBitmapBundle( lineStyleDesc.bitmap ) );
|
||||||
|
|
||||||
m_typeCombo->Append( DEFAULT_STYLE );
|
m_typeCombo->Append( DEFAULT_STYLE );
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,8 @@ void PANEL_SETUP_PINMAP::OnMouseLeave( wxMouseEvent& aEvent )
|
||||||
void PANEL_SETUP_PINMAP::reBuildMatrixPanel()
|
void PANEL_SETUP_PINMAP::reBuildMatrixPanel()
|
||||||
{
|
{
|
||||||
// Try to know the size of bitmap button used in drc matrix
|
// Try to know the size of bitmap button used in drc matrix
|
||||||
wxBitmapButton* dummy = new wxBitmapButton( m_matrixPanel, wxID_ANY, KiBitmap( BITMAPS::ercerr ),
|
wxBitmapButton* dummy =
|
||||||
|
new wxBitmapButton( m_matrixPanel, wxID_ANY, KiBitmapBundle( BITMAPS::ercerr ),
|
||||||
wxDefaultPosition, wxDefaultSize, wxBORDER_NONE );
|
wxDefaultPosition, wxDefaultSize, wxBORDER_NONE );
|
||||||
wxSize bitmapSize = dummy->GetSize();
|
wxSize bitmapSize = dummy->GetSize();
|
||||||
delete dummy;
|
delete dummy;
|
||||||
|
@ -194,7 +195,8 @@ void PANEL_SETUP_PINMAP::reBuildMatrixPanel()
|
||||||
m_buttonList[ii][jj]->Unbind(wxEVT_LEAVE_WINDOW, &PANEL_SETUP_PINMAP::OnMouseLeave, this );
|
m_buttonList[ii][jj]->Unbind(wxEVT_LEAVE_WINDOW, &PANEL_SETUP_PINMAP::OnMouseLeave, this );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBitmapButton* btn = new wxBitmapButton( m_matrixPanel, id, KiBitmap( bitmap_butt ),
|
wxBitmapButton* btn =
|
||||||
|
new wxBitmapButton( m_matrixPanel, id, KiBitmapBundle( bitmap_butt ),
|
||||||
wxPoint( x, y ), wxDefaultSize, wxBORDER_NONE );
|
wxPoint( x, y ), wxDefaultSize, wxBORDER_NONE );
|
||||||
btn->Bind( wxEVT_LEAVE_WINDOW, &PANEL_SETUP_PINMAP::OnMouseLeave, this );
|
btn->Bind( wxEVT_LEAVE_WINDOW, &PANEL_SETUP_PINMAP::OnMouseLeave, this );
|
||||||
btn->Bind( wxEVT_ENTER_WINDOW, &PANEL_SETUP_PINMAP::OnMouseEnter, this );
|
btn->Bind( wxEVT_ENTER_WINDOW, &PANEL_SETUP_PINMAP::OnMouseEnter, this );
|
||||||
|
|
|
@ -138,7 +138,7 @@ DIALOG_SHAPE_PROPERTIES::DIALOG_SHAPE_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent,
|
||||||
}
|
}
|
||||||
|
|
||||||
for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames )
|
for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames )
|
||||||
m_lineStyleCombo->Append( lineStyleDesc.name, KiBitmap( lineStyleDesc.bitmap ) );
|
m_lineStyleCombo->Append( lineStyleDesc.name, KiBitmapBundle( lineStyleDesc.bitmap ) );
|
||||||
|
|
||||||
m_lineStyleCombo->Append( DEFAULT_STYLE );
|
m_lineStyleCombo->Append( DEFAULT_STYLE );
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,7 @@ DIALOG_TEXTBOX_PROPERTIES::DIALOG_TEXTBOX_PROPERTIES( PCB_BASE_EDIT_FRAME* aPare
|
||||||
m_OrientCtrl->SetString( ii, wxString::Format( "%.1f", rot_list[ii] ) );
|
m_OrientCtrl->SetString( ii, wxString::Format( "%.1f", rot_list[ii] ) );
|
||||||
|
|
||||||
for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames )
|
for( const auto& [ lineStyle, lineStyleDesc ] : lineTypeNames )
|
||||||
m_borderStyleCombo->Append( lineStyleDesc.name, KiBitmap( lineStyleDesc.bitmap ) );
|
m_borderStyleCombo->Append( lineStyleDesc.name, KiBitmapBundle( lineStyleDesc.bitmap ) );
|
||||||
|
|
||||||
m_borderStyleCombo->Append( DEFAULT_STYLE );
|
m_borderStyleCombo->Append( DEFAULT_STYLE );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue