mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-30 00:28:11 +08:00
Bundle Graphite using Tauri (#873)
* Setup tauri component for graphite editor Integrate graphite into tauri app Split interpreted-executor out of graph-craft * Add gpu execution node * General Cleanup
This commit is contained in:
committed by
Keavon Chambers
parent
52cc770a1e
commit
7d8f94462a
@@ -453,7 +453,7 @@ impl Fsm for ArtboardToolFsmState {
|
||||
plus: false,
|
||||
}]),
|
||||
HintGroup(vec![HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Backspace])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Backspace]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Delete Artboard"),
|
||||
@@ -461,7 +461,7 @@ impl Fsm for ArtboardToolFsmState {
|
||||
}]),
|
||||
]),
|
||||
ArtboardToolFsmState::Dragging => HintData(vec![HintGroup(vec![HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Constrain to Axis"),
|
||||
@@ -469,14 +469,14 @@ impl Fsm for ArtboardToolFsmState {
|
||||
}])]),
|
||||
ArtboardToolFsmState::Drawing | ArtboardToolFsmState::ResizingBounds => HintData(vec![HintGroup(vec![
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Constrain Square"),
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("From Center"),
|
||||
|
||||
@@ -191,14 +191,14 @@ impl Fsm for EllipseToolFsmState {
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Constrain Circular"),
|
||||
plus: true,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("From Center"),
|
||||
@@ -207,14 +207,14 @@ impl Fsm for EllipseToolFsmState {
|
||||
])]),
|
||||
EllipseToolFsmState::Drawing => HintData(vec![HintGroup(vec![
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Constrain Circular"),
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("From Center"),
|
||||
|
||||
@@ -178,7 +178,7 @@ impl Fsm for EyedropperToolFsmState {
|
||||
},
|
||||
])]),
|
||||
EyedropperToolFsmState::SamplingPrimary | EyedropperToolFsmState::SamplingSecondary => HintData(vec![HintGroup(vec![HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Escape])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Escape]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Cancel"),
|
||||
|
||||
@@ -518,7 +518,7 @@ impl Fsm for GradientToolFsmState {
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Snap 15°"),
|
||||
@@ -526,7 +526,7 @@ impl Fsm for GradientToolFsmState {
|
||||
},
|
||||
])]),
|
||||
GradientToolFsmState::Drawing => HintData(vec![HintGroup(vec![HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Snap 15°"),
|
||||
|
||||
@@ -190,14 +190,14 @@ impl Fsm for ImaginateToolFsmState {
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Constrain Square"),
|
||||
plus: true,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("From Center"),
|
||||
@@ -206,14 +206,14 @@ impl Fsm for ImaginateToolFsmState {
|
||||
])]),
|
||||
ImaginateToolFsmState::Drawing => HintData(vec![HintGroup(vec![
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Constrain Square"),
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("From Center"),
|
||||
|
||||
@@ -247,21 +247,21 @@ impl Fsm for LineToolFsmState {
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Snap 15°"),
|
||||
plus: true,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("From Center"),
|
||||
plus: true,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Control])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Control]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Lock Angle"),
|
||||
@@ -270,21 +270,21 @@ impl Fsm for LineToolFsmState {
|
||||
])]),
|
||||
LineToolFsmState::Drawing => HintData(vec![HintGroup(vec![
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Snap 15°"),
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("From Center"),
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Control])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Control]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Lock Angle"),
|
||||
|
||||
@@ -201,7 +201,7 @@ impl Fsm for NavigateToolFsmState {
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Zoom Out"),
|
||||
@@ -217,7 +217,7 @@ impl Fsm for NavigateToolFsmState {
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Control])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Control]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Snap Increments"),
|
||||
@@ -240,7 +240,7 @@ impl Fsm for NavigateToolFsmState {
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Control])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Control]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Snap 15°"),
|
||||
@@ -249,14 +249,14 @@ impl Fsm for NavigateToolFsmState {
|
||||
]),
|
||||
]),
|
||||
NavigateToolFsmState::Tilting => HintData(vec![HintGroup(vec![HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Control])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Control]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Snap 15°"),
|
||||
plus: false,
|
||||
}])]),
|
||||
NavigateToolFsmState::Zooming => HintData(vec![HintGroup(vec![HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Control])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Control]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Snap Increments"),
|
||||
|
||||
@@ -190,14 +190,14 @@ impl Fsm for NodeGraphToolFsmState {
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Constrain Square"),
|
||||
plus: true,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("From Center"),
|
||||
@@ -206,14 +206,14 @@ impl Fsm for NodeGraphToolFsmState {
|
||||
])]),
|
||||
NodeGraphToolFsmState::Drawing => HintData(vec![HintGroup(vec![
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Constrain Square"),
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("From Center"),
|
||||
|
||||
@@ -322,7 +322,7 @@ impl Fsm for PathToolFsmState {
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Grow/Shrink Selection"),
|
||||
@@ -339,10 +339,10 @@ impl Fsm for PathToolFsmState {
|
||||
HintGroup(vec![
|
||||
HintInfo {
|
||||
key_groups: vec![
|
||||
KeysGroup(vec![Key::ArrowUp]),
|
||||
KeysGroup(vec![Key::ArrowRight]),
|
||||
KeysGroup(vec![Key::ArrowDown]),
|
||||
KeysGroup(vec![Key::ArrowLeft]),
|
||||
KeysGroup(vec![Key::ArrowUp]).into(),
|
||||
KeysGroup(vec![Key::ArrowRight]).into(),
|
||||
KeysGroup(vec![Key::ArrowDown]).into(),
|
||||
KeysGroup(vec![Key::ArrowLeft]).into(),
|
||||
],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
@@ -350,7 +350,7 @@ impl Fsm for PathToolFsmState {
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Big Increment Nudge"),
|
||||
@@ -359,21 +359,21 @@ impl Fsm for PathToolFsmState {
|
||||
]),
|
||||
HintGroup(vec![
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::KeyG])],
|
||||
key_groups: vec![KeysGroup(vec![Key::KeyG]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Grab Selected (coming soon)"),
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::KeyR])],
|
||||
key_groups: vec![KeysGroup(vec![Key::KeyR]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Rotate Selected (coming soon)"),
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::KeyS])],
|
||||
key_groups: vec![KeysGroup(vec![Key::KeyS]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Scale Selected (coming soon)"),
|
||||
@@ -383,14 +383,14 @@ impl Fsm for PathToolFsmState {
|
||||
]),
|
||||
PathToolFsmState::Dragging => HintData(vec![HintGroup(vec![
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Split/Align Handles (Toggle)"),
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Share Lengths of Aligned Handles"),
|
||||
|
||||
@@ -636,21 +636,21 @@ impl Fsm for PenToolFsmState {
|
||||
plus: false,
|
||||
}]),
|
||||
HintGroup(vec![HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Control])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Control]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Snap 15°"),
|
||||
plus: false,
|
||||
}]),
|
||||
HintGroup(vec![HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Break Handle"),
|
||||
plus: false,
|
||||
}]),
|
||||
HintGroup(vec![HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Enter])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Enter]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("End Path"),
|
||||
|
||||
@@ -192,14 +192,14 @@ impl Fsm for RectangleToolFsmState {
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Constrain Square"),
|
||||
plus: true,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("From Center"),
|
||||
@@ -208,14 +208,14 @@ impl Fsm for RectangleToolFsmState {
|
||||
])]),
|
||||
RectangleToolFsmState::Drawing => HintData(vec![HintGroup(vec![
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Constrain Square"),
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("From Center"),
|
||||
|
||||
@@ -793,21 +793,21 @@ impl Fsm for SelectToolFsmState {
|
||||
}]),
|
||||
HintGroup(vec![
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::KeyG])],
|
||||
key_groups: vec![KeysGroup(vec![Key::KeyG]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Grab Selected"),
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::KeyR])],
|
||||
key_groups: vec![KeysGroup(vec![Key::KeyR]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Rotate Selected"),
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::KeyS])],
|
||||
key_groups: vec![KeysGroup(vec![Key::KeyS]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Scale Selected"),
|
||||
@@ -823,14 +823,14 @@ impl Fsm for SelectToolFsmState {
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Control])],
|
||||
key_groups_mac: Some(vec![KeysGroup(vec![Key::Command])]),
|
||||
key_groups: vec![KeysGroup(vec![Key::Control]).into()],
|
||||
key_groups_mac: Some(vec![KeysGroup(vec![Key::Command]).into()]),
|
||||
mouse: None,
|
||||
label: String::from("Innermost"),
|
||||
plus: true,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Grow/Shrink Selection"),
|
||||
@@ -846,7 +846,7 @@ impl Fsm for SelectToolFsmState {
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Grow/Shrink Selection"),
|
||||
@@ -856,10 +856,10 @@ impl Fsm for SelectToolFsmState {
|
||||
HintGroup(vec![
|
||||
HintInfo {
|
||||
key_groups: vec![
|
||||
KeysGroup(vec![Key::ArrowUp]),
|
||||
KeysGroup(vec![Key::ArrowRight]),
|
||||
KeysGroup(vec![Key::ArrowDown]),
|
||||
KeysGroup(vec![Key::ArrowLeft]),
|
||||
KeysGroup(vec![Key::ArrowUp]).into(),
|
||||
KeysGroup(vec![Key::ArrowRight]).into(),
|
||||
KeysGroup(vec![Key::ArrowDown]).into(),
|
||||
KeysGroup(vec![Key::ArrowLeft]).into(),
|
||||
],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
@@ -867,7 +867,7 @@ impl Fsm for SelectToolFsmState {
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Big Increment Nudge"),
|
||||
@@ -876,15 +876,15 @@ impl Fsm for SelectToolFsmState {
|
||||
]),
|
||||
HintGroup(vec![
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: Some(MouseMotion::LmbDrag),
|
||||
label: String::from("Move Duplicate"),
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Control, Key::KeyD])],
|
||||
key_groups_mac: Some(vec![KeysGroup(vec![Key::Command, Key::KeyD])]),
|
||||
key_groups: vec![KeysGroup(vec![Key::Control, Key::KeyD]).into()],
|
||||
key_groups_mac: Some(vec![KeysGroup(vec![Key::Command, Key::KeyD]).into()]),
|
||||
mouse: None,
|
||||
label: String::from("Duplicate"),
|
||||
plus: false,
|
||||
@@ -893,14 +893,14 @@ impl Fsm for SelectToolFsmState {
|
||||
]),
|
||||
SelectToolFsmState::Dragging => HintData(vec![HintGroup(vec![
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Constrain to Axis"),
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Control])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Control]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Snap to Points (coming soon)"),
|
||||
@@ -910,7 +910,7 @@ impl Fsm for SelectToolFsmState {
|
||||
SelectToolFsmState::DrawingBox => HintData(vec![]),
|
||||
SelectToolFsmState::ResizingBounds => HintData(vec![]),
|
||||
SelectToolFsmState::RotatingBounds => HintData(vec![HintGroup(vec![HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Control])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Control]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Snap 15°"),
|
||||
|
||||
@@ -235,14 +235,14 @@ impl Fsm for ShapeToolFsmState {
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Constrain 1:1 Aspect"),
|
||||
plus: true,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("From Center"),
|
||||
@@ -251,14 +251,14 @@ impl Fsm for ShapeToolFsmState {
|
||||
])]),
|
||||
ShapeToolFsmState::Drawing => HintData(vec![HintGroup(vec![
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Shift]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Constrain 1:1 Aspect"),
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Alt]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("From Center"),
|
||||
|
||||
@@ -267,7 +267,7 @@ impl Fsm for SplineToolFsmState {
|
||||
plus: false,
|
||||
}]),
|
||||
HintGroup(vec![HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Enter])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Enter]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("End Spline"),
|
||||
|
||||
@@ -474,14 +474,14 @@ impl Fsm for TextToolFsmState {
|
||||
])]),
|
||||
TextToolFsmState::Editing => HintData(vec![HintGroup(vec![
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Control, Key::Enter])],
|
||||
key_groups_mac: Some(vec![KeysGroup(vec![Key::Command, Key::Enter])]),
|
||||
key_groups: vec![KeysGroup(vec![Key::Control, Key::Enter]).into()],
|
||||
key_groups_mac: Some(vec![KeysGroup(vec![Key::Command, Key::Enter]).into()]),
|
||||
mouse: None,
|
||||
label: String::from("Commit Edit"),
|
||||
plus: false,
|
||||
},
|
||||
HintInfo {
|
||||
key_groups: vec![KeysGroup(vec![Key::Escape])],
|
||||
key_groups: vec![KeysGroup(vec![Key::Escape]).into()],
|
||||
key_groups_mac: None,
|
||||
mouse: None,
|
||||
label: String::from("Discard Edit"),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use super::tool_messages::*;
|
||||
use crate::messages::input_mapper::utility_types::input_keyboard::KeysGroup;
|
||||
use crate::messages::input_mapper::utility_types::input_keyboard::LayoutKeysGroup;
|
||||
use crate::messages::input_mapper::utility_types::input_keyboard::MouseMotion;
|
||||
use crate::messages::input_mapper::utility_types::macros::action_keys;
|
||||
use crate::messages::input_mapper::utility_types::misc::ActionKeys;
|
||||
@@ -21,7 +21,7 @@ pub type ToolActionHandlerData<'a> = (&'a DocumentMessageHandler, u64, &'a Docum
|
||||
pub trait ToolCommon: for<'a> MessageHandler<ToolMessage, ToolActionHandlerData<'a>> + PropertyHolder + ToolTransition + ToolMetadata {}
|
||||
impl<T> ToolCommon for T where T: for<'a> MessageHandler<ToolMessage, ToolActionHandlerData<'a>> + PropertyHolder + ToolTransition + ToolMetadata {}
|
||||
|
||||
type Tool = dyn ToolCommon;
|
||||
type Tool = dyn ToolCommon + Send + Sync;
|
||||
|
||||
pub trait Fsm {
|
||||
type ToolData;
|
||||
@@ -442,10 +442,10 @@ pub struct HintInfo {
|
||||
/// A `KeysGroup` specifies all the keys pressed simultaneously to perform an action (like "Ctrl C" to copy).
|
||||
/// Usually at most one is given, but less commonly, multiple can be used to describe additional hotkeys not used simultaneously (like the four different arrow keys to nudge a layer).
|
||||
#[serde(rename = "keyGroups")]
|
||||
pub key_groups: Vec<KeysGroup>,
|
||||
pub key_groups: Vec<LayoutKeysGroup>,
|
||||
/// `None` means that the regular `key_groups` should be used for all platforms, `Some` is an override for a Mac-only input hint.
|
||||
#[serde(rename = "keyGroupsMac")]
|
||||
pub key_groups_mac: Option<Vec<KeysGroup>>,
|
||||
pub key_groups_mac: Option<Vec<LayoutKeysGroup>>,
|
||||
/// An optional `MouseMotion` that can indicate the mouse action, like which mouse button is used and whether a drag occurs.
|
||||
/// No such icon is shown if `None` is given, and it can be combined with `key_groups` if desired.
|
||||
pub mouse: Option<MouseMotion>,
|
||||
|
||||
Reference in New Issue
Block a user