diff --git a/Cargo.lock b/Cargo.lock index 2dfedc1..d12298e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2245,7 +2245,7 @@ dependencies = [ [[package]] name = "pdf-presenter" -version = "0.1.64" +version = "0.1.65" dependencies = [ "bytemuck", "chrono", diff --git a/Cargo.toml b/Cargo.toml index 8e15ed1..cdaa0d4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ default-members = ["crates/pdf-presenter"] resolver = "3" [workspace.package] -version = "0.1.64" +version = "0.1.65" edition = "2024" license = "MIT" repository = "https://proxy.dandaedre.com/gitea/idle-org/pdf-presenter" diff --git a/crates/pdf-presenter/src/presenter_ui.rs b/crates/pdf-presenter/src/presenter_ui.rs index 96353b1..d9a202d 100644 --- a/crates/pdf-presenter/src/presenter_ui.rs +++ b/crates/pdf-presenter/src/presenter_ui.rs @@ -1145,7 +1145,10 @@ pub fn presenter(ui: &mut Ui, s: &mut Studio, native: &mut UiState) { } }); } - if !footer && (s.loading || s.notes_loading || (s.deck.is_some() && !s.fully_buffered())) { + let compact_preparation = s.loading + || s.notes_loading + || (s.deck.is_some() && !s.fully_buffered() && s.evicted_frames == 0); + if !footer && compact_preparation { egui::Area::new("preparation-progress".into()) .anchor(egui::Align2::LEFT_BOTTOM, Vec2::new(12., -12.)) .interactable(false) diff --git a/crates/pdf-presenter/tests/presenter_ui.rs b/crates/pdf-presenter/tests/presenter_ui.rs index 70ecfeb..8022f76 100644 --- a/crates/pdf-presenter/tests/presenter_ui.rs +++ b/crates/pdf-presenter/tests/presenter_ui.rs @@ -1052,6 +1052,46 @@ fn progress_bar_height_changes_rendered_geometry() { } } +#[test] +fn hidden_footer_hides_routine_rolling_buffer_status() { + fn contains_text(shape: &egui::Shape, needle: &str) -> bool { + match shape { + egui::Shape::Text(text) => text.galley.text().contains(needle), + egui::Shape::Vec(shapes) => shapes.iter().any(|shape| contains_text(shape, needle)), + _ => false, + } + } + let ctx = Context::default(); + let mut s = studio(); + s.layout.header = false; + s.layout.footer = false; + s.evicted_frames = 1; + s.prepared.insert(0); + let mut native = UiState::default(); + + let hidden = ctx.run_ui(input(Vec2::new(1280., 900.)), |ui| { + presenter_ui::presenter(ui, &mut s, &mut native) + }); + assert!(s.preparation_status().contains("Rolling buffer")); + assert!( + !hidden + .shapes + .iter() + .any(|shape| contains_text(&shape.shape, "Rolling buffer")) + ); + + s.layout.footer = true; + let visible = ctx.run_ui(input(Vec2::new(1280., 900.)), |ui| { + presenter_ui::presenter(ui, &mut s, &mut native) + }); + assert!( + visible + .shapes + .iter() + .any(|shape| contains_text(&shape.shape, "Rolling buffer")) + ); +} + #[test] fn fullscreen_and_routing_changes_preserve_explicit_output_visibility() { for blanked in [false, true] { diff --git a/docs/changelog.md b/docs/changelog.md index bf1ff05..dff2e91 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -2,6 +2,13 @@ ## Unreleased +### 0.1.65 + +- Hide routine rolling-buffer information when the presenter footer is hidden, + including its auto-hidden state. Keep active opening and notes-reading feedback + available without the footer. Linux checks pass with 86.50% whole-application + coverage; the release binary is rebuilt. + ### 0.1.64 - Keep previous/next shortcuts active in the presenter and All slides, even when a diff --git a/docs/user-guide.md b/docs/user-guide.md index d1ca52f..d10a2d8 100644 --- a/docs/user-guide.md +++ b/docs/user-guide.md @@ -144,8 +144,9 @@ render. Sources and their folders remain unchanged. The footer shows the active operation, slides prepared/total, cache reuse, decoded RAM usage, and an approximate ETA once there are enough completed slides. It also shows output-process buffering separately. A compact progress notification remains -visible while preparing if the footer is hidden. Notes reading and failures have -explicit status. ETAs use observed throughput and may change on complex slides. +visible during initial preparation if the footer is hidden. Routine rolling-buffer +information hides with the footer. Notes reading and failures have explicit status. +ETAs use observed throughput and may change on complex slides. **READY** means every target-resolution slide is held in presenter RAM and, when outputs are assigned, acknowledged in the independent presentation host's RAM.