From 23c2104ffa1a1d2a8212550ec81c5a98ae4d8622 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 15 Feb 2024 12:48:29 +0000 Subject: [PATCH] Improve alignment tooltips. (cherry picked from commit 2ab492474e2983ee218ec711a0e769a3cb8e590d) --- eeschema/tools/ee_actions.cpp | 2 +- eeschema/tools/sch_move_tool.cpp | 6 +++--- eeschema/tools/sch_move_tool.h | 2 +- pcbnew/tools/pcb_actions.cpp | 16 ++++++++-------- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/eeschema/tools/ee_actions.cpp b/eeschema/tools/ee_actions.cpp index 7ce18131b3..fd47e24352 100644 --- a/eeschema/tools/ee_actions.cpp +++ b/eeschema/tools/ee_actions.cpp @@ -1348,7 +1348,7 @@ TOOL_ACTION EE_ACTIONS::drag( TOOL_ACTION_ARGS() TOOL_ACTION EE_ACTIONS::alignToGrid( TOOL_ACTION_ARGS() .Name( "eeschema.AlignToGrid" ) .Scope( AS_GLOBAL ) - .FriendlyName( _( "Align Elements to Grid" ) ) + .FriendlyName( _( "Align Items to Grid" ) ) .Icon( BITMAPS::align_elements_to_grid ) .Flags( AF_ACTIVATE ) ); diff --git a/eeschema/tools/sch_move_tool.cpp b/eeschema/tools/sch_move_tool.cpp index 4f61088d3f..58b5879c65 100644 --- a/eeschema/tools/sch_move_tool.cpp +++ b/eeschema/tools/sch_move_tool.cpp @@ -1578,7 +1578,7 @@ void SCH_MOVE_TOOL::moveItem( EDA_ITEM* aItem, const VECTOR2I& aDelta ) } -int SCH_MOVE_TOOL::AlignElements( const TOOL_EVENT& aEvent ) +int SCH_MOVE_TOOL::AlignToGrid( const TOOL_EVENT& aEvent ) { EE_GRID_HELPER grid( m_toolMgr); EE_SELECTION& selection = m_selectionTool->RequestSelection( EE_COLLECTOR::MovableItems ); @@ -1750,7 +1750,7 @@ int SCH_MOVE_TOOL::AlignElements( const TOOL_EVENT& aEvent ) m_toolMgr->PostEvent( EVENTS::SelectedItemsMoved ); m_frame->SchematicCleanUp( &commit ); - commit.Push( _( "Align" ) ); + commit.Push( _( "Align Items to Grid" ) ); return 0; } @@ -1772,7 +1772,7 @@ void SCH_MOVE_TOOL::setTransitions() { Go( &SCH_MOVE_TOOL::Main, EE_ACTIONS::move.MakeEvent() ); Go( &SCH_MOVE_TOOL::Main, EE_ACTIONS::drag.MakeEvent() ); - Go( &SCH_MOVE_TOOL::AlignElements, EE_ACTIONS::alignToGrid.MakeEvent() ); + Go( &SCH_MOVE_TOOL::AlignToGrid, EE_ACTIONS::alignToGrid.MakeEvent() ); } diff --git a/eeschema/tools/sch_move_tool.h b/eeschema/tools/sch_move_tool.h index e60bc84605..faeb47e9d3 100644 --- a/eeschema/tools/sch_move_tool.h +++ b/eeschema/tools/sch_move_tool.h @@ -60,7 +60,7 @@ public: * @param aEvent current event that activated the tool * @return 0 */ - int AlignElements( const TOOL_EVENT& aEvent ); + int AlignToGrid( const TOOL_EVENT& aEvent ); private: bool doMoveSelection( const TOOL_EVENT& aEvent, SCH_COMMIT* aCommit, bool aIsSlice ); diff --git a/pcbnew/tools/pcb_actions.cpp b/pcbnew/tools/pcb_actions.cpp index dc1a056d5c..25661a6987 100644 --- a/pcbnew/tools/pcb_actions.cpp +++ b/pcbnew/tools/pcb_actions.cpp @@ -1921,56 +1921,56 @@ TOOL_ACTION PCB_ACTIONS::alignTop( TOOL_ACTION_ARGS() .Name( "pcbnew.AlignAndDistribute.alignTop" ) .Scope( AS_GLOBAL ) .FriendlyName( _( "Align to Top" ) ) - .Tooltip( _( "Aligns selected items to the top edge" ) ) + .Tooltip( _( "Aligns selected items to the top edge of the item under the cursor" ) ) .Icon( BITMAPS::align_items_top ) ); TOOL_ACTION PCB_ACTIONS::alignBottom( TOOL_ACTION_ARGS() .Name( "pcbnew.AlignAndDistribute.alignBottom" ) .Scope( AS_GLOBAL ) .FriendlyName( _( "Align to Bottom" ) ) - .Tooltip( _( "Aligns selected items to the bottom edge" ) ) + .Tooltip( _( "Aligns selected items to the bottom edge of the item under the cursor" ) ) .Icon( BITMAPS::align_items_bottom ) ); TOOL_ACTION PCB_ACTIONS::alignLeft( TOOL_ACTION_ARGS() .Name( "pcbnew.AlignAndDistribute.alignLeft" ) .Scope( AS_GLOBAL ) .FriendlyName( _( "Align to Left" ) ) - .Tooltip( _( "Aligns selected items to the left edge" ) ) + .Tooltip( _( "Aligns selected items to the left edge of the item under the cursor" ) ) .Icon( BITMAPS::align_items_left ) ); TOOL_ACTION PCB_ACTIONS::alignRight( TOOL_ACTION_ARGS() .Name( "pcbnew.AlignAndDistribute.alignRight" ) .Scope( AS_GLOBAL ) .FriendlyName( _( "Align to Right" ) ) - .Tooltip( _( "Aligns selected items to the right edge" ) ) + .Tooltip( _( "Aligns selected items to the right edge of the item under the cursor" ) ) .Icon( BITMAPS::align_items_right ) ); TOOL_ACTION PCB_ACTIONS::alignCenterY( TOOL_ACTION_ARGS() .Name( "pcbnew.AlignAndDistribute.alignCenterY" ) .Scope( AS_GLOBAL ) .FriendlyName( _( "Align to Vertical Center" ) ) - .Tooltip( _( "Aligns selected items to the vertical center" ) ) + .Tooltip( _( "Aligns selected items to the vertical center of the item under the cursor" ) ) .Icon( BITMAPS::align_items_center ) ); TOOL_ACTION PCB_ACTIONS::alignCenterX( TOOL_ACTION_ARGS() .Name( "pcbnew.AlignAndDistribute.alignCenterX" ) .Scope( AS_GLOBAL ) .FriendlyName( _( "Align to Horizontal Center" ) ) - .Tooltip( _( "Aligns selected items to the horizontal center" ) ) + .Tooltip( _( "Aligns selected items to the horizontal center of the item under the cursor" ) ) .Icon( BITMAPS::align_items_middle ) ); TOOL_ACTION PCB_ACTIONS::distributeHorizontally( TOOL_ACTION_ARGS() .Name( "pcbnew.AlignAndDistribute.distributeHorizontally" ) .Scope( AS_GLOBAL ) .FriendlyName( _( "Distribute Horizontally" ) ) - .Tooltip( _( "Distributes selected items along the horizontal axis" ) ) + .Tooltip( _( "Distributes selected items between the left-most item and the right-most item" ) ) .Icon( BITMAPS::distribute_horizontal ) ); TOOL_ACTION PCB_ACTIONS::distributeVertically( TOOL_ACTION_ARGS() .Name( "pcbnew.AlignAndDistribute.distributeVertically" ) .Scope( AS_GLOBAL ) .FriendlyName( _( "Distribute Vertically" ) ) - .Tooltip( _( "Distributes selected items along the vertical axis" ) ) + .Tooltip( _( "Distributes selected items between the top-most item and the bottom-most item" ) ) .Icon( BITMAPS::distribute_vertical ) );