mirror of
https://github.com/narrrl/proton-stream.git
synced 2026-11-03 16:41:26 +01:00
fix(app): stop from the full player, and keep fullscreen and speed in step
- The full player overlay had no Stop: Esc leaves the page and keeps playing, so ending an episode took a trip to the bar underneath. It has a Stop button now, and stopping from fullscreen leaves fullscreen. - `F` toggled the app's own idea of fullscreen, which the window manager could change behind it (F11, a title-bar double-click). The flag now follows the window. - The speed menu stopped at 2x while `]` went to 3x.
This commit is contained in:
1 parent
33da1563ee
commit
3ff55a9af9
3 files changed
+30
-1
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user