Hide rolling status with presenter footer

This commit is contained in:
Dandaedre 2026-11-20 09:05:40 +01:00
parent 57a8ff2848
commit 71fef0a2e4
6 changed files with 56 additions and 5 deletions

2
Cargo.lock generated
View File

@ -2245,7 +2245,7 @@ dependencies = [
[[package]]
name = "pdf-presenter"
version = "0.1.64"
version = "0.1.65"
dependencies = [
"bytemuck",
"chrono",

View File

@ -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"

View File

@ -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)

View File

@ -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] {

View File

@ -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

View File

@ -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.