Alternative way for setting icons for align/distribute actions.
This commit is contained in:
parent
f0a7c1715e
commit
59346a6ef1
|
@ -580,32 +580,32 @@ TOOL_ACTION COMMON_ACTIONS::pointEditorRemoveCorner( "pcbnew.PointEditor.removeC
|
|||
TOOL_ACTION COMMON_ACTIONS::alignTop( "pcbnew.Place.alignTop",
|
||||
AS_GLOBAL, 0,
|
||||
_( "Align items to the top" ),
|
||||
_( "Aligns selected items to the top edge" ) );
|
||||
_( "Aligns selected items to the top edge" ), up_xpm );
|
||||
|
||||
TOOL_ACTION COMMON_ACTIONS::alignBottom( "pcbnew.Place.alignBottom",
|
||||
AS_GLOBAL, 0,
|
||||
_( "Align items to the bottom" ),
|
||||
_( "Aligns selected items to the bottom edge" ) );
|
||||
_( "Aligns selected items to the bottom edge" ), down_xpm );
|
||||
|
||||
TOOL_ACTION COMMON_ACTIONS::alignLeft( "pcbnew.Place.alignLeft",
|
||||
AS_GLOBAL, 0,
|
||||
_( "Align items to the left" ),
|
||||
_( "Aligns selected items to the left edge" ) );
|
||||
_( "Aligns selected items to the left edge" ), left_xpm );
|
||||
|
||||
TOOL_ACTION COMMON_ACTIONS::alignRight( "pcbnew.Place.alignRight",
|
||||
AS_GLOBAL, 0,
|
||||
_( "Align items to the right" ),
|
||||
_( "Aligns selected items to the right edge" ) );
|
||||
_( "Aligns selected items to the right edge" ), right_xpm );
|
||||
|
||||
TOOL_ACTION COMMON_ACTIONS::distributeHorizontally( "pcbnew.Place.distributeHorizontally",
|
||||
AS_GLOBAL, 0,
|
||||
_( "Distribute horizontally" ),
|
||||
_( "Distributes selected items along the horizontal axis" ) );
|
||||
_( "Distributes selected items along the horizontal axis" ), distribute_horizontal_xpm );
|
||||
|
||||
TOOL_ACTION COMMON_ACTIONS::distributeVertically( "pcbnew.Place.distributeVertically",
|
||||
AS_GLOBAL, 0,
|
||||
_( "Distribute vertically" ),
|
||||
_( "Distributes selected items along the vertical axis" ) );
|
||||
_( "Distributes selected items along the vertical axis" ), distribute_vertical_xpm );
|
||||
|
||||
|
||||
boost::optional<TOOL_EVENT> COMMON_ACTIONS::TranslateLegacyId( int aId )
|
||||
|
|
|
@ -61,21 +61,14 @@ bool PLACEMENT_TOOL::Init()
|
|||
m_placementMenu = new CONTEXT_MENU;
|
||||
m_placementMenu->SetIcon( align_items_xpm );
|
||||
|
||||
// Add all menuitem commands
|
||||
wxMenuItem* item;
|
||||
item = m_placementMenu->Add( COMMON_ACTIONS::alignTop );
|
||||
SET_BITMAP( KiBitmap( up_xpm ) );
|
||||
item = m_placementMenu->Add( COMMON_ACTIONS::alignBottom );
|
||||
SET_BITMAP( KiBitmap( down_xpm ) );
|
||||
item = m_placementMenu->Add( COMMON_ACTIONS::alignLeft );
|
||||
SET_BITMAP( KiBitmap( left_xpm ) );
|
||||
item = m_placementMenu->Add( COMMON_ACTIONS::alignRight );
|
||||
SET_BITMAP( KiBitmap( right_xpm ) );
|
||||
// Add all align/distribute commands
|
||||
m_placementMenu->Add( COMMON_ACTIONS::alignTop );
|
||||
m_placementMenu->Add( COMMON_ACTIONS::alignBottom );
|
||||
m_placementMenu->Add( COMMON_ACTIONS::alignLeft );
|
||||
m_placementMenu->Add( COMMON_ACTIONS::alignRight );
|
||||
m_placementMenu->AppendSeparator();
|
||||
item = m_placementMenu->Add( COMMON_ACTIONS::distributeHorizontally );
|
||||
SET_BITMAP( KiBitmap( distribute_horizontal_xpm ) );
|
||||
item = m_placementMenu->Add( COMMON_ACTIONS::distributeVertically );
|
||||
SET_BITMAP( KiBitmap( distribute_vertical_xpm ) );
|
||||
m_placementMenu->Add( COMMON_ACTIONS::distributeHorizontally );
|
||||
m_placementMenu->Add( COMMON_ACTIONS::distributeVertically );
|
||||
|
||||
m_selectionTool->GetToolMenu().GetMenu().AddMenu(
|
||||
m_placementMenu, _( "Align/distribute" ), false,
|
||||
|
|
Loading…
Reference in New Issue