Standardize increment snapping to use the Shift key

This commit is contained in:
Keavon Chambers
2025-02-05 03:23:47 -08:00
parent 4de65c292a
commit f13efd2d06
9 changed files with 21 additions and 34 deletions
@@ -496,11 +496,11 @@ impl Fsm for GradientToolFsmState {
let hint_data = match self {
GradientToolFsmState::Ready => HintData(vec![HintGroup(vec![
HintInfo::mouse(MouseMotion::LmbDrag, "Draw Gradient"),
HintInfo::keys([Key::Shift], "Snap 15°").prepend_plus(),
HintInfo::keys([Key::Shift], "15° Increments").prepend_plus(),
])]),
GradientToolFsmState::Drawing => HintData(vec![
HintGroup(vec![HintInfo::mouse(MouseMotion::Rmb, ""), HintInfo::keys([Key::Escape], "Cancel").prepend_slash()]),
HintGroup(vec![HintInfo::keys([Key::Shift], "Snap 15°")]),
HintGroup(vec![HintInfo::keys([Key::Shift], "15° Increments")]),
]),
};
@@ -265,14 +265,14 @@ impl Fsm for LineToolFsmState {
let hint_data = match self {
LineToolFsmState::Ready => HintData(vec![HintGroup(vec![
HintInfo::mouse(MouseMotion::LmbDrag, "Draw Line"),
HintInfo::keys([Key::Shift], "Snap 15°").prepend_plus(),
HintInfo::keys([Key::Shift], "15° Increments").prepend_plus(),
HintInfo::keys([Key::Alt], "From Center").prepend_plus(),
HintInfo::keys([Key::Control], "Lock Angle").prepend_plus(),
])]),
LineToolFsmState::Drawing => HintData(vec![
HintGroup(vec![HintInfo::mouse(MouseMotion::Rmb, ""), HintInfo::keys([Key::Escape], "Cancel").prepend_slash()]),
HintGroup(vec![
HintInfo::keys([Key::Shift], "Snap 15°"),
HintInfo::keys([Key::Shift], "15° Increments"),
HintInfo::keys([Key::Alt], "From Center"),
HintInfo::keys([Key::Control], "Lock Angle"),
]),
@@ -152,16 +152,16 @@ impl Fsm for NavigateToolFsmState {
HintInfo::keys_and_mouse([Key::Space], MouseMotion::LmbDrag, "Pan").prepend_slash(),
]),
HintGroup(vec![HintInfo::keys_and_mouse([Key::Alt], MouseMotion::LmbDrag, "Tilt")]),
HintGroup(vec![HintInfo::mouse(MouseMotion::LmbDrag, "Zoom"), HintInfo::keys([Key::Control], "Increments").prepend_plus()]),
HintGroup(vec![HintInfo::mouse(MouseMotion::LmbDrag, "Zoom"), HintInfo::keys([Key::Shift], "Increments").prepend_plus()]),
HintGroup(vec![HintInfo::mouse(MouseMotion::Lmb, "Zoom In"), HintInfo::keys([Key::Shift], "Zoom Out").prepend_plus()]),
]),
NavigateToolFsmState::Tilting => HintData(vec![
HintGroup(vec![HintInfo::mouse(MouseMotion::Rmb, ""), HintInfo::keys([Key::Escape], "Cancel").prepend_slash()]),
HintGroup(vec![HintInfo::keys([Key::Control], "Snap 15°")]),
HintGroup(vec![HintInfo::keys([Key::Shift], "15° Increments")]),
]),
NavigateToolFsmState::Zooming => HintData(vec![
HintGroup(vec![HintInfo::mouse(MouseMotion::Rmb, ""), HintInfo::keys([Key::Escape], "Cancel").prepend_slash()]),
HintGroup(vec![HintInfo::keys([Key::Control], "Increments")]),
HintGroup(vec![HintInfo::keys([Key::Shift], "Increments")]),
]),
};
@@ -1206,7 +1206,7 @@ impl Fsm for PathToolFsmState {
if colinear != ManipulatorAngle::Free {
hints.push(HintInfo::keys([Key::Alt], "Equidistant Handles"));
}
hints.push(HintInfo::keys([Key::Shift], "Snap 15°"));
hints.push(HintInfo::keys([Key::Shift], "15° Increments"));
hints.push(HintInfo::keys([Key::Control], "Lock Angle"));
hints.push(drag_anchor);
hints
@@ -1216,7 +1216,7 @@ impl Fsm for PathToolFsmState {
if colinear != ManipulatorAngle::Free {
hints.push(HintInfo::keys([Key::Alt], "Equidistant Handles"));
}
hints.push(HintInfo::keys([Key::Shift], "Snap 15°"));
hints.push(HintInfo::keys([Key::Shift], "15° Increments"));
hints.push(HintInfo::keys([Key::Control], "Lock Angle"));
hints.push(drag_anchor);
hints
@@ -1138,7 +1138,7 @@ impl Fsm for PenToolFsmState {
HintInfo::keys([Key::Escape], "").prepend_slash(),
HintInfo::keys([Key::Enter], "End Path").prepend_slash(),
]),
HintGroup(vec![HintInfo::keys([Key::Shift], "Snap 15°"), HintInfo::keys([Key::Control], "Lock Angle")]),
HintGroup(vec![HintInfo::keys([Key::Shift], "15° Increments"), HintInfo::keys([Key::Control], "Lock Angle")]),
HintGroup(vec![HintInfo::mouse(MouseMotion::Lmb, "Add Sharp Point"), HintInfo::mouse(MouseMotion::LmbDrag, "Add Smooth Point")]),
HintGroup(vec![HintInfo::mouse(MouseMotion::Lmb, ""), HintInfo::mouse(MouseMotion::LmbDrag, "Bend Prev. Point").prepend_slash()]),
]),
@@ -1159,7 +1159,7 @@ impl Fsm for PenToolFsmState {
}
};
let mut common_hints = vec![HintInfo::keys([Key::Shift], "Snap 15°"), HintInfo::keys([Key::Control], "Lock Angle")];
let mut common_hints = vec![HintInfo::keys([Key::Shift], "15° Increments"), HintInfo::keys([Key::Control], "Lock Angle")];
let hold_group = match mode {
HandleMode::Free => common_hints,
HandleMode::ColinearLocked => {
@@ -1368,7 +1368,7 @@ impl Fsm for SelectToolFsmState {
SelectToolFsmState::RotatingBounds => {
let hint_data = HintData(vec![
HintGroup(vec![HintInfo::mouse(MouseMotion::Rmb, ""), HintInfo::keys([Key::Escape], "Cancel").prepend_slash()]),
HintGroup(vec![HintInfo::keys([Key::Control], "Snap")]),
HintGroup(vec![HintInfo::keys([Key::Shift], "15° Increments")]),
]);
responses.add(FrontendMessage::UpdateInputHints { hint_data });
}