diff --git a/crates/ui-egui/src/presenter.rs b/crates/ui-egui/src/presenter.rs index 877beb60e..c11253d85 100644 --- a/crates/ui-egui/src/presenter.rs +++ b/crates/ui-egui/src/presenter.rs @@ -323,7 +323,9 @@ mod tests { .with_step_dt(1.0 / 60.0) .with_context_setup(|ctx| { let install = craft::ui::runtime::InstallSpec::new(Default::default(), std::sync::Arc::new(craft::window::system::NoWindows)); - embed::install(ctx, install, &UiFonts::new(&I18nScripts)).unwrap(); + // The app's symbol face, which draws the ◀ and ▶ of the Previous and Next buttons. + let fonts = UiFonts::new(&I18nScripts).egui_face("Hack", &[craft::ui::fonts::FontRef::proportional()]); + embed::install(ctx, install, &fonts).unwrap(); embed::before_input(ctx, |_| FrameInput::new(RootEnv::default())); }) .build_ui_state( diff --git a/crates/ui-egui/src/show/tests.rs b/crates/ui-egui/src/show/tests.rs index 033c6056b..353ec9e4c 100644 --- a/crates/ui-egui/src/show/tests.rs +++ b/crates/ui-egui/src/show/tests.rs @@ -420,7 +420,8 @@ fn the_prefetched_frame_is_the_frame_shown_on_entry() { let room = vec2(size.0 as f32, size.1 as f32) / ctx.pixels_per_point(); let _ = prepare(&mut show, &doc, &media, ctx, 0.0, &[], room); show.frames.run_inline(16); - assert!(show.apply(ShowAction::Slide(1), &doc, 1.0)); + let enter = show.state.goto(&doc, 1); + assert!(show.apply(enter, &doc, 1.0)); let _ = prepare(&mut show, &doc, &media, ctx, 1.0, &[], room); let texture = show.frames.current_texture().expect("the prefetched slide is shown"); assert_eq!(show.frames.shown_slide(), Some(1)); diff --git a/crates/ui-egui/src/show/tool.rs b/crates/ui-egui/src/show/tool.rs index a342e399d..af304e063 100644 --- a/crates/ui-egui/src/show/tool.rs +++ b/crates/ui-egui/src/show/tool.rs @@ -252,8 +252,8 @@ impl CanvasTool for ShowTool<'_> { } } - /// The canvas routes the arrows and Escape to its tool, not to the scope's shortcuts: they run the show - /// commands that bind them. + /// The canvas routes the arrows to its tool, not to the scope's shortcuts: they run the show commands + /// that bind them. Enter, Escape and the deletes stay with the show scope. fn key(&mut self, key: &ToolKey, cx: &mut ToolContext<'_>) -> bool { let command = match key { ToolKey::Nudge { direction, mods, .. } if mods.is_none() => { @@ -263,7 +263,6 @@ impl CanvasTool for ShowTool<'_> { ShowCommands::Previous } } - ToolKey::Cancel => ShowCommands::Cancel, _ => return false, }; let Some(space) = cx.space() else { return false }; diff --git a/crates/ui-egui/src/show/ui.rs b/crates/ui-egui/src/show/ui.rs index 5545baca7..3142fffc4 100644 --- a/crates/ui-egui/src/show/ui.rs +++ b/crates/ui-egui/src/show/ui.rs @@ -232,7 +232,6 @@ fn publish(bcx: &mut BodyCx<'_>, show: &Show) { fn commands(bcx: &mut BodyCx<'_>, show: &mut Show, doc: &Arc, now: f64, zoom: &ShowZoomInputs<'_>, out: &mut Out) { // take_command drains only this pass's firings; reruns never replay a held key or a previous click. while let Some((command, _)) = bcx.take_command::() { - eprintln!("DIAG leaving_the_ppsx_show_keeps_the_deck_open: show command {command:?}"); out.keep &= run_command(show, doc, now, command, ShowWindow::Audience, zoom); } }