diff --git a/crates/pstr-app/src/app.rs b/crates/pstr-app/src/app.rs index 3d3afd4..1c644d4 100644 --- a/crates/pstr-app/src/app.rs +++ b/crates/pstr-app/src/app.rs @@ -982,6 +982,10 @@ impl App { // — unless the next episode is already opening, which is // exactly where the viewer wants to stay. if self.page == Page::Player && self.opening.is_none() { + if self.fullscreen { + self.fullscreen = false; + ctx.send_viewport_cmd(egui::ViewportCommand::Fullscreen(false)); + } self.page = match target { Some(key) => Page::Title(key), None => Page::Library, @@ -1854,6 +1858,11 @@ impl eframe::App for App { let ctx = ui.ctx().clone(); let ctx = &ctx; self.pump(ctx, frame); + // The window manager can leave fullscreen without asking (F11, a + // double-click on a title bar), and `F` then toggled the wrong way. + if let Some(actual) = ctx.input(|input| input.viewport().fullscreen) { + self.fullscreen = actual; + } // A window left open for days still picks up what was added: the // launch check alone would only ever run once. let now = ctx.input(|input| input.time); diff --git a/crates/pstr-app/src/ui/player.rs b/crates/pstr-app/src/ui/player.rs index 41770ed..47eaf67 100644 --- a/crates/pstr-app/src/ui/player.rs +++ b/crates/pstr-app/src/ui/player.rs @@ -740,6 +740,25 @@ fn chrome( actions.push(Action::ToggleEpisodes); } } + // Esc leaves the page and keeps playing; this is the one-step + // way to be done with the episode. + ui.add_space(theme::space::S); + if ui + .add( + egui::Button::new( + theme::Role::Subhead + .rich(egui_phosphor::regular::STOP) + .color(Color32::WHITE), + ) + .fill(Color32::from_black_alpha(160)) + .corner_radius(CornerRadius::same(theme::radius::MD)) + .min_size(Vec2::new(38.0, 32.0)), + ) + .on_hover_text("Stop") + .clicked() + { + actions.push(Action::Player(Command::Stop)); + } }); }, ); diff --git a/crates/pstr-app/src/ui/transport.rs b/crates/pstr-app/src/ui/transport.rs index 2060199..9a34482 100644 --- a/crates/pstr-app/src/ui/transport.rs +++ b/crates/pstr-app/src/ui/transport.rs @@ -509,7 +509,8 @@ fn speed_menu(ui: &mut egui::Ui, playback: &Playback, actions: &mut Vec) format!("Speed · {}", ui::format_speed(playback.speed)) }; ui.menu_button(label, |ui| { - for speed in [0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0] { + // The same steps `[` and `]` walk. + for speed in [0.5, 0.75, 1.0, 1.25, 1.5, 1.75, 2.0, 3.0] { if ui .selectable_label( (playback.speed - speed).abs() < 1e-6,