Skip to content

Commit

Permalink
Change full-screen visualisation shortcut to shift-space
Browse files Browse the repository at this point in the history
  • Loading branch information
Procrat committed May 12, 2023
1 parent e62f97f commit fae1b87
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,16 @@
<kbd>cmd</kbd>+<kbd>alt</kbd>+<kbd>t</kbd>/<kbd>r</kbd>.
- [Fixed a bug where selecting a nested breadcrumb would cause the order of
breadcrumbs to change incorrectly.][6617]
- [Changed the shortcut to show the full-screen visualization for a node from
<kbd>space</kbd> <kbd>space</kbd> to <kbd>shift</kbd>+<kbd>space</kbd>.][6663]
so that it doesn't interfere with the shortcut for toggling the small
visualization.

[6421]: https://github.com/enso-org/enso/pull/6421
[6530]: https://github.com/enso-org/enso/pull/6530
[6620]: https://github.com/enso-org/enso/pull/6620
[6617]: https://github.com/enso-org/enso/pull/6617
[6663]: https://github.com/enso-org/enso/pull/6663

#### EnsoGL (rendering engine)

Expand Down
9 changes: 4 additions & 5 deletions app/gui/view/graph-editor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -562,14 +562,13 @@ ensogl::define_endpoints_2! {
/// other case, it will be disabled as soon as the `release_visualization_visibility` is
/// emitted.
press_visualization_visibility(),
/// Simulates a visualization open double press event. This event toggles the visualization
/// fullscreen mode.
double_press_visualization_visibility(),
/// Simulates a visualization open release event. See `press_visualization_visibility` to
/// learn more.
release_visualization_visibility(),
/// Cycle the visualization for the selected nodes.
cycle_visualization_for_selected_node(),
/// Opens the visualization for the selected node in full-screen mode.
open_fullscreen_visualization (),
/// The visualization currently displayed as fullscreen is
close_fullscreen_visualization(),

Expand Down Expand Up @@ -3536,7 +3535,7 @@ fn new_graph_editor(app: &Application) -> GraphEditor {
// - If it was long, disable vis which were disabled (preview mode).

let viz_press_ev = inputs.press_visualization_visibility.clone_ref();
let viz_d_press_ev = inputs.double_press_visualization_visibility.clone_ref();
let viz_open_fs_ev = inputs.open_fullscreen_visualization.clone_ref();
let viz_release_ev = inputs.release_visualization_visibility.clone_ref();
viz_pressed <- bool(&viz_release_ev,&viz_press_ev);
viz_was_pressed <- viz_pressed.previous();
Expand Down Expand Up @@ -3581,7 +3580,7 @@ fn new_graph_editor(app: &Application) -> GraphEditor {
viz_disable_by_press <= viz_tgt_nodes.gate(&viz_tgt_nodes_all_on);
viz_disable <- any(viz_disable_by_press,inputs.disable_visualization);
viz_preview_disable <= viz_tgt_nodes_off.sample(&viz_preview_mode_end);
viz_fullscreen_on <= viz_d_press_ev.map(f_!(model.nodes.last_selected()));
viz_fullscreen_on <= viz_open_fs_ev.map(f_!(model.nodes.last_selected()));

eval viz_enable ((id) model.enable_visualization(id));
eval viz_disable ((id) model.disable_visualization(id));
Expand Down
4 changes: 2 additions & 2 deletions app/gui/view/graph-editor/src/shortcuts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ pub const SHORTCUTS: &[(ensogl::application::shortcut::ActionType, &str, &str, &
(Press, "!read_only", "cmd g", "collapse_selected_nodes"),
// === Visualization ===
(Press, "!node_editing", "space", "press_visualization_visibility"),
(DoublePress, "!node_editing", "space", "double_press_visualization_visibility"),
(Press, "!node_editing", "shift space", "open_fullscreen_visualization"),
(Release, "!node_editing", "space", "release_visualization_visibility"),
(Press, "", "cmd i", "reload_visualization_registry"),
(Press, "is_fs_visualization_displayed", "space", "close_fullscreen_visualization"),
(Press, "is_fs_visualization_displayed", "shift space", "close_fullscreen_visualization"),
(Press, "", "cmd", "enable_quick_visualization_preview"),
(Release, "", "cmd", "disable_quick_visualization_preview"),
// === Selection ===
Expand Down

0 comments on commit fae1b87

Please sign in to comment.