diff options
| author | Martin Owens <doctormo@gmail.com> | 2019-02-25 04:08:15 +0000 |
|---|---|---|
| committer | Martin Owens <doctormo@gmail.com> | 2019-02-25 04:08:15 +0000 |
| commit | 2434be048e1dd4b78b53ac0d7b32df4b70bb411d (patch) | |
| tree | 698eb8b6ba00dd18816713cf682116b7f4c398dc /src | |
| parent | Add option for on canvas align handles and move group selection checkbox (diff) | |
| download | inkscape-2434be048e1dd4b78b53ac0d7b32df4b70bb411d.tar.gz inkscape-2434be048e1dd4b78b53ac0d7b32df4b70bb411d.zip | |
Seperate out center alignment and add sepcific tool text for it
Diffstat (limited to 'src')
| -rw-r--r-- | src/seltrans-handles.cpp | 5 | ||||
| -rw-r--r-- | src/seltrans-handles.h | 5 | ||||
| -rw-r--r-- | src/seltrans.cpp | 4 |
3 files changed, 10 insertions, 4 deletions
diff --git a/src/seltrans-handles.cpp b/src/seltrans-handles.cpp index 5cf2457a1..1c5ed73c1 100644 --- a/src/seltrans-handles.cpp +++ b/src/seltrans-handles.cpp @@ -20,7 +20,8 @@ SPSelTransTypeInfo const handtypes[] = { { DEF_COLOR, N_("<b>Skew</b> selection; with <b>Ctrl</b> to snap angle; with <b>Shift</b> to skew around the opposite side") }, { DEF_COLOR, N_("<b>Rotate</b> selection; with <b>Ctrl</b> to snap angle; with <b>Shift</b> to rotate around the opposite corner") }, { CEN_COLOR, N_("<b>Center</b> of rotation and skewing: drag to reposition; scaling with Shift also uses this center") }, - { DEF_COLOR, N_("<b>Align</b> selected objects to the side clicked; <b>Shift</b> click to align against side instead.") } + { DEF_COLOR, N_("<b>Align</b> objects to the side clicked; <b>Shift</b> click to invert side; <b>Ctrl</b> to group whole selection.") }, + { DEF_COLOR, N_("<b>Align</b> objects to center; <b>Shift</b> click to center vertically instead of horizontally.") } }; SPSelTransHandle const hands[] = { @@ -47,7 +48,7 @@ SPSelTransHandle const hands[] = { {HANDLE_ALIGN, SP_ANCHOR_W, GDK_RIGHT_SIDE, 14, 1, 0.5}, {HANDLE_ALIGN, SP_ANCHOR_N, GDK_BOTTOM_SIDE, 15, 0.5, 0}, {HANDLE_ALIGN, SP_ANCHOR_E, GDK_LEFT_SIDE, 16, 0, 0.5}, - {HANDLE_ALIGN, SP_ANCHOR_CENTER, GDK_CROSSHAIR, 17, 0.5, 0.5}, + {HANDLE_CENTER_ALIGN, SP_ANCHOR_CENTER, GDK_CROSSHAIR, 17, 0.5, 0.5}, {HANDLE_ALIGN, SP_ANCHOR_SE, GDK_TOP_LEFT_CORNER, 18, 0, 1}, {HANDLE_ALIGN, SP_ANCHOR_SW, GDK_TOP_RIGHT_CORNER, 19, 1, 1}, {HANDLE_ALIGN, SP_ANCHOR_NW, GDK_BOTTOM_RIGHT_CORNER, 20, 1, 0}, diff --git a/src/seltrans-handles.h b/src/seltrans-handles.h index 5b0e71c5e..e224d4e7d 100644 --- a/src/seltrans-handles.h +++ b/src/seltrans-handles.h @@ -35,7 +35,8 @@ enum SPSelTransType { HANDLE_SKEW, HANDLE_ROTATE, HANDLE_CENTER, - HANDLE_ALIGN + HANDLE_ALIGN, + HANDLE_CENTER_ALIGN }; // Which handle does what in the alignment (clicking) @@ -71,7 +72,7 @@ struct SPSelTransTypeInfo { char const *tip; }; // One per handle type in order -extern SPSelTransTypeInfo const handtypes[6]; +extern SPSelTransTypeInfo const handtypes[7]; struct SPSelTransHandle; diff --git a/src/seltrans.cpp b/src/seltrans.cpp index 235c29c65..bd8483a6f 100644 --- a/src/seltrans.cpp +++ b/src/seltrans.cpp @@ -613,6 +613,7 @@ void Inkscape::SelTrans::_updateHandles() _showHandles(HANDLE_SCALE); } else if(_state == STATE_ALIGN) { _showHandles(HANDLE_ALIGN); + _showHandles(HANDLE_CENTER_ALIGN); } else { _showHandles(HANDLE_SKEW); _showHandles(HANDLE_ROTATE); @@ -745,6 +746,7 @@ void Inkscape::SelTrans::handleClick(SPKnot */*knot*/, guint state, SPSelTransHa } break; case HANDLE_ALIGN: + case HANDLE_CENTER_ALIGN: align(state, handle); default: break; @@ -807,6 +809,7 @@ void Inkscape::SelTrans::handleNewEvent(SPKnot *knot, Geom::Point *position, gui setCenter(*position); break; case HANDLE_ALIGN: + case HANDLE_CENTER_ALIGN: break; } } @@ -1110,6 +1113,7 @@ gboolean Inkscape::SelTrans::request(SPSelTransHandle const &handle, Geom::Point case HANDLE_CENTER: return centerRequest(pt, state); case HANDLE_ALIGN: + case HANDLE_CENTER_ALIGN: break; // Do nothing, no dragging } return FALSE; |
