Rename display roles and edit layouts across presenters
This commit is contained in:
parent
3ea94a34b0
commit
2d7c95674c
|
|
@ -2245,7 +2245,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "pdf-presenter"
|
||||
version = "0.1.78"
|
||||
version = "0.1.79"
|
||||
dependencies = [
|
||||
"bytemuck",
|
||||
"chrono",
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ default-members = ["crates/pdf-presenter"]
|
|||
resolver = "3"
|
||||
|
||||
[workspace.package]
|
||||
version = "0.1.78"
|
||||
version = "0.1.79"
|
||||
edition = "2024"
|
||||
license = "MIT"
|
||||
repository = "https://proxy.dandaedre.com/gitea/idle-org/pdf-presenter"
|
||||
|
|
|
|||
|
|
@ -18,8 +18,8 @@
|
|||
</p>
|
||||
|
||||
PDF Presenter is a desktop presenter for **PDFs and picture folders**. Show slides
|
||||
fullscreen on your presentation screens while keeping previews, notes, timers and
|
||||
navigation on your presenter screen. Rehearse on one monitor, or mirror either view
|
||||
fullscreen on your Slides screens while keeping previews, notes, timers and
|
||||
navigation on your Presenter screens. Rehearse on one monitor, or mirror either view
|
||||
across several displays.
|
||||
|
||||
## Download, extract, present
|
||||
|
|
@ -41,7 +41,7 @@ are not yet available. Test your display setup before using it for a live event.
|
|||
|
||||
1. **Open your slides.** Choose Menu → Open PDF or Open picture folder, or drop your
|
||||
file/folder onto the presenter. Pictures follow natural filename order.
|
||||
2. **Choose your screens.** In Displays, assign Presenter or Presentation to each
|
||||
2. **Choose your screens.** In Displays, assign Presenter or Slides to each
|
||||
monitor. Try the arrangement, then keep it or let it revert automatically.
|
||||
3. **Make room for what matters.** In Layout, resize or hide previews and notes,
|
||||
place the timers, and optionally enable slide progress. Save for this project
|
||||
|
|
@ -58,7 +58,7 @@ and an ETA when available; decks larger than the RAM budget use a rolling buffer
|
|||
Notes can come from the PDF or picture-folder sidecars. Themes and English/French
|
||||
controls are available in Menu. Optional shared slide zoom is available under
|
||||
**Menu → Preferences → Enable page zoom**; scroll to zoom, drag to pan, double-click
|
||||
to reset on the current preview or presentation screen.
|
||||
to reset on the current preview or Slides screen.
|
||||
|
||||
## Import your notes
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ pub fn tr<'a>(ctx: &egui::Context, text: &'a str) -> &'a str {
|
|||
"Scroll to zoom · drag to pan · double-click to fit width / reset" => {
|
||||
"Molette pour zoomer · glisser pour déplacer · double-clic pour ajuster à la largeur / réinitialiser"
|
||||
}
|
||||
"Use the current slide preview or a presentation screen. Changing slides resets zoom." => {
|
||||
"Use the current slide preview or a Slides screen. Changing slides resets zoom." => {
|
||||
"Utilisez l’aperçu actuel ou un écran de présentation. Changer de diapositive réinitialise le zoom."
|
||||
}
|
||||
"Zoom reuses buffered images: no extra PDF rendering or image memory. Enlarged slides may look softer. Software drawing can slow down on large or multiple displays." => {
|
||||
|
|
@ -140,14 +140,14 @@ pub fn tr<'a>(ctx: &egui::Context, text: &'a str) -> &'a str {
|
|||
"Displays" => "Écrans",
|
||||
"All slides" => "Toutes les diapositives",
|
||||
"Layout" => "Disposition",
|
||||
"Show presentation" => "Afficher la présentation",
|
||||
"Blank presentation" => "Masquer la présentation",
|
||||
"Show slides" => "Afficher les diapositives",
|
||||
"Blank slides" => "Masquer les diapositives",
|
||||
"Previous" => "Précédente",
|
||||
"Next" => "Suivante",
|
||||
"NO OUTPUT DISPLAYED" => "AUCUNE SORTIE AFFICHÉE",
|
||||
"PRESENTING" => "EN DIFFUSION",
|
||||
"PREPARING OUTPUT" => "PRÉPARATION DE LA SORTIE",
|
||||
"Your presenter view" => "Votre vue présentateur",
|
||||
"Presenter layout" => "Disposition du présentateur",
|
||||
"Balanced" => "Équilibrée",
|
||||
"Slide focus" => "Diapositive seule",
|
||||
"Notes first" => "Priorité aux notes",
|
||||
|
|
@ -187,13 +187,13 @@ pub fn tr<'a>(ctx: &egui::Context, text: &'a str) -> &'a str {
|
|||
}
|
||||
"Unused" => "Inutilisé",
|
||||
"Presenter" => "Présentateur",
|
||||
"Presentation" => "Présentation",
|
||||
"Slides" => "Diapositives",
|
||||
"Swap groups" => "Inverser les groupes",
|
||||
"Window positioning can be unreliable in windowed mode, especially on Linux. Switch back to fullscreen if you experience positioning issues." => {
|
||||
"Le positionnement des fenêtres peut être peu fiable en mode fenêtré, surtout sous Linux. Revenez au plein écran si vous rencontrez des problèmes de positionnement."
|
||||
}
|
||||
"Presenter fullscreen" => "Présentateur en plein écran",
|
||||
"Presentation fullscreen" => "Présentation en plein écran",
|
||||
"Slides fullscreen" => "Diapositives en plein écran",
|
||||
"Apply and remember" => "Appliquer et mémoriser",
|
||||
"Output visibility is preserved while previewing display changes." => {
|
||||
"La visibilité de la sortie est conservée pendant l’aperçu des changements."
|
||||
|
|
@ -261,8 +261,8 @@ pub fn tr<'a>(ctx: &egui::Context, text: &'a str) -> &'a str {
|
|||
"Raise only within available RAM; OS paging can cause delays. Screen rendering is capped at 4096 px." => {
|
||||
"Restez dans la RAM disponible : la mémoire virtuelle peut ralentir l’affichage. Rendu limité à 4096 px."
|
||||
}
|
||||
"Show presentation automatically when opening a document" => {
|
||||
"Afficher automatiquement la présentation à l’ouverture d’un document"
|
||||
"Show slides automatically when opening a document" => {
|
||||
"Afficher automatiquement les diapositives à l’ouverture d’un document"
|
||||
}
|
||||
"Quit" => "Quitter",
|
||||
"Theme" => "Thème",
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ impl NativeWindow {
|
|||
let title = match role {
|
||||
Role::Presenter => "PDF Presenter — Presenter",
|
||||
Role::Browser => "PDF Presenter — All slides",
|
||||
Role::Presentation => "PDF Presenter — Presentation",
|
||||
Role::Presentation => "PDF Presenter — Slides",
|
||||
};
|
||||
let attributes = crate::artwork::window_attributes()
|
||||
.with_title(title)
|
||||
|
|
@ -307,10 +307,7 @@ impl NativeWindow {
|
|||
);
|
||||
if setup.setup_controls {
|
||||
response.context_menu(|ui| {
|
||||
if ui
|
||||
.button("Swap presenter and presentation displays…")
|
||||
.clicked()
|
||||
{
|
||||
if ui.button("Swap Presenter and Slides screens…").clicked() {
|
||||
*display_action = Some(DisplayAction::Swap);
|
||||
ui.close();
|
||||
}
|
||||
|
|
@ -643,8 +640,7 @@ impl App {
|
|||
|| (self.override_presenter.is_some()
|
||||
&& self.override_presenter == self.override_output)
|
||||
{
|
||||
self.error =
|
||||
Some("Choose distinct, connected presenter and presentation monitors".into());
|
||||
self.error = Some("Choose distinct, connected Presenter and Slides screens".into());
|
||||
el.exit();
|
||||
return;
|
||||
}
|
||||
|
|
@ -682,9 +678,8 @@ impl App {
|
|||
{
|
||||
s.routes.presenter.push(presenter.id.clone());
|
||||
} else {
|
||||
self.error = Some(
|
||||
"Presentation output requires a separate presenter monitor".into(),
|
||||
);
|
||||
self.error =
|
||||
Some("Slides output requires a separate Presenter screen".into());
|
||||
el.exit();
|
||||
return;
|
||||
}
|
||||
|
|
@ -757,7 +752,7 @@ impl App {
|
|||
};
|
||||
#[cfg(target_os = "linux")]
|
||||
if role == Role::Browser {
|
||||
// Prefer the presenter on the chosen monitor, never an audience window.
|
||||
// Prefer the Presenter on the chosen monitor, never a Slides window.
|
||||
let parent = self
|
||||
.windows
|
||||
.iter()
|
||||
|
|
@ -809,7 +804,7 @@ impl App {
|
|||
h.state.blanked = true;
|
||||
let _ = h.acks.try_send(Ack {
|
||||
request_blank: true,
|
||||
status: "Presentation blanked from output keyboard.".into(),
|
||||
status: "Slides blanked from output keyboard.".into(),
|
||||
..Default::default()
|
||||
});
|
||||
}
|
||||
|
|
@ -954,7 +949,7 @@ impl App {
|
|||
fn poll(&mut self, el: &ActiveEventLoop) {
|
||||
let mut repaint = false;
|
||||
if let Some(s) = &mut self.studio {
|
||||
repaint |= s.new_zoom || s.new_overlay;
|
||||
repaint |= s.new_zoom || s.new_overlay || std::mem::take(&mut s.presenter_views_dirty);
|
||||
let before = (
|
||||
s.generation,
|
||||
s.frames.len(),
|
||||
|
|
@ -1277,7 +1272,8 @@ impl App {
|
|||
);
|
||||
} else {
|
||||
let _ = host.acks.try_send(Ack {
|
||||
status: "Presentation RAM cannot fit active frames; increase the budget.".into(),
|
||||
status: "Slides RAM cannot fit active frames; increase the budget."
|
||||
.into(),
|
||||
..Default::default()
|
||||
});
|
||||
}
|
||||
|
|
@ -1416,7 +1412,7 @@ impl ApplicationHandler for App {
|
|||
h.state.blanked = true;
|
||||
let _ = h.acks.try_send(Ack {
|
||||
request_blank: true,
|
||||
status: "Presentation blanked from output window.".into(),
|
||||
status: "Slides blanked from output window.".into(),
|
||||
..Default::default()
|
||||
});
|
||||
self.redraw();
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ pub struct HostState {
|
|||
pub blank_picture: Option<FrameInfo>,
|
||||
pub quit: bool,
|
||||
}
|
||||
/// Actual size of the reference presentation window, never presenter content.
|
||||
/// Actual size of the reference Slides window, never Presenter content.
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
pub struct OutputViewport {
|
||||
pub monitor: String,
|
||||
|
|
@ -199,7 +199,7 @@ impl OutputLink {
|
|||
terminate_output(&managed_child);
|
||||
let _ = results.try_send(Ack {
|
||||
status:
|
||||
"Presentation host stopped. Restarting with the current output visibility."
|
||||
"Slides process stopped. Restarting with the current output visibility."
|
||||
.into(),
|
||||
..Default::default()
|
||||
});
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ pub enum Action {
|
|||
Swap,
|
||||
/// Cycle the presenter display, keeping roles separate when possible.
|
||||
PresenterDisplay,
|
||||
/// Cycle the audience display, keeping roles separate when possible.
|
||||
/// Cycle the Slides screen, keeping roles separate when possible.
|
||||
AudienceDisplay,
|
||||
/// Toggle audience fullscreen.
|
||||
Fullscreen,
|
||||
|
|
@ -80,7 +80,7 @@ impl Model {
|
|||
return Err("Display index is out of range; use --list-monitors.".into());
|
||||
}
|
||||
if displays.len() > 1 && presenter == audience {
|
||||
return Err("Choose different presenter and audience displays.".into());
|
||||
return Err("Choose different Presenter and Slides screens.".into());
|
||||
}
|
||||
let fullscreen = !windowed;
|
||||
Ok(Self {
|
||||
|
|
|
|||
|
|
@ -829,6 +829,7 @@ pub fn presenter(ui: &mut Ui, s: &mut Studio, native: &mut UiState) {
|
|||
let mut view = crate::studio::PresenterView {
|
||||
layout: s.layout.clone(),
|
||||
layout_open: s.layout_open,
|
||||
layout_target: None,
|
||||
menu_open: s.menu_open,
|
||||
};
|
||||
presenter_view(ui, s, native, &mut view, None);
|
||||
|
|
@ -1274,9 +1275,9 @@ fn presenter_view(
|
|||
if ui
|
||||
.button(
|
||||
egui::RichText::new(if s.blanked {
|
||||
tr(&locale, "Show presentation")
|
||||
tr(&locale, "Show slides")
|
||||
} else {
|
||||
tr(&locale, "Blank presentation")
|
||||
tr(&locale, "Blank slides")
|
||||
})
|
||||
.color(if s.blanked {
|
||||
ui.visuals().error_fg_color
|
||||
|
|
@ -1459,8 +1460,40 @@ fn presenter_view(
|
|||
});
|
||||
}
|
||||
if view.layout_open {
|
||||
let layout_choices = display.map_or_else(Vec::new, |_| {
|
||||
s.routes
|
||||
.presenter
|
||||
.iter()
|
||||
.filter_map(|id| {
|
||||
s.monitors
|
||||
.iter()
|
||||
.position(|monitor| &monitor.id == id)
|
||||
.map(|index| {
|
||||
(
|
||||
id.clone(),
|
||||
format!("Display {} · {}", index + 1, s.monitors[index].name),
|
||||
)
|
||||
})
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
});
|
||||
let owner_display = display.map(str::to_owned);
|
||||
let mut selected_layout_display = view
|
||||
.layout_target
|
||||
.clone()
|
||||
.filter(|selected| layout_choices.iter().any(|(id, _)| id == selected))
|
||||
.or_else(|| owner_display.clone());
|
||||
let rendered_layout_display = selected_layout_display.clone();
|
||||
let editing_remote = rendered_layout_display.is_some()
|
||||
&& rendered_layout_display.as_deref() != owner_display.as_deref();
|
||||
let mut remote_view = editing_remote
|
||||
.then(|| s.take_presenter_view(rendered_layout_display.as_deref().unwrap()));
|
||||
let remote_layout_before = remote_view.as_ref().map(|remote| remote.layout.clone());
|
||||
let layout = remote_view
|
||||
.as_mut()
|
||||
.map_or(&mut view.layout, |remote| &mut remote.layout);
|
||||
let mut open = true;
|
||||
egui::Window::new(tr(&locale, "Your presenter view"))
|
||||
egui::Window::new(tr(&locale, "Presenter layout"))
|
||||
.id(egui::Id::new("layout-window"))
|
||||
.open(&mut open)
|
||||
.default_size(Vec2::new(560., 680.).min(ctx.content_rect().size() - Vec2::splat(48.)))
|
||||
|
|
@ -1472,10 +1505,34 @@ fn presenter_view(
|
|||
ui.spacing_mut().button_padding = Vec2::new(12., 7.);
|
||||
ui.spacing_mut().interact_size.y = 30.;
|
||||
ui.visuals_mut().slider_trailing_fill = true;
|
||||
if let Some(display) = display {
|
||||
if let Some((index, monitor)) = s.monitors.iter().enumerate().find(|(_, m)| m.id == display) {
|
||||
ui.strong(format!("{} {} · {}", if s.settings.language.french() { "Écran" } else { "Display" }, index + 1, monitor.name));
|
||||
}
|
||||
if display.is_some() {
|
||||
ui.horizontal(|ui| {
|
||||
ui.strong(if s.settings.language.french() {
|
||||
"Modifier la disposition de"
|
||||
} else {
|
||||
"Edit layout for"
|
||||
});
|
||||
let selected = selected_layout_display
|
||||
.as_ref()
|
||||
.and_then(|selected| {
|
||||
layout_choices
|
||||
.iter()
|
||||
.find(|(id, _)| id == selected)
|
||||
.map(|(_, label)| label.as_str())
|
||||
})
|
||||
.unwrap_or("Presenter");
|
||||
egui::ComboBox::from_id_salt("layout-presenter-display")
|
||||
.selected_text(selected)
|
||||
.show_ui(ui, |ui| {
|
||||
for (id, label) in &layout_choices {
|
||||
ui.selectable_value(
|
||||
&mut selected_layout_display,
|
||||
Some(id.clone()),
|
||||
label,
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
ui.label(if s.settings.language.french() {
|
||||
"Disposition et sauvegardes propres à cet écran. Le fonctionnement du minuteur reste partagé."
|
||||
} else {
|
||||
|
|
@ -1502,20 +1559,20 @@ fn presenter_view(
|
|||
layout_section(ui, tr(&locale, "Start with a preset"), |ui| {
|
||||
ui.horizontal_wrapped(|ui| {
|
||||
if ui.button(tr(&locale, "Balanced")).clicked() {
|
||||
view.layout = Layout::default();
|
||||
*layout = Layout::default();
|
||||
}
|
||||
if ui.button(tr(&locale, "Slide focus")).clicked() {
|
||||
view.layout = Layout::default();
|
||||
view.layout.previous.show = false;
|
||||
view.layout.next.show = false;
|
||||
view.layout.notes.show = false;
|
||||
view.layout.elapsed.show = false;
|
||||
view.layout.clock.show = false;
|
||||
*layout = Layout::default();
|
||||
layout.previous.show = false;
|
||||
layout.next.show = false;
|
||||
layout.notes.show = false;
|
||||
layout.elapsed.show = false;
|
||||
layout.clock.show = false;
|
||||
}
|
||||
if ui.button(tr(&locale, "Notes first")).clicked() {
|
||||
view.layout.notes.show = true;
|
||||
view.layout.notes.size = 60.;
|
||||
view.layout.previous.show = false;
|
||||
layout.notes.show = true;
|
||||
layout.notes.size = 60.;
|
||||
layout.previous.show = false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -1527,7 +1584,7 @@ fn presenter_view(
|
|||
widget(
|
||||
ui,
|
||||
tr(&locale, "Previous slide"),
|
||||
&mut view.layout.previous,
|
||||
&mut layout.previous,
|
||||
30.,
|
||||
160.,
|
||||
"Relative size",
|
||||
|
|
@ -1535,7 +1592,7 @@ fn presenter_view(
|
|||
widget(
|
||||
ui,
|
||||
tr(&locale, "Current slide"),
|
||||
&mut view.layout.current,
|
||||
&mut layout.current,
|
||||
60.,
|
||||
200.,
|
||||
"Relative size",
|
||||
|
|
@ -1543,7 +1600,7 @@ fn presenter_view(
|
|||
widget(
|
||||
ui,
|
||||
tr(&locale, "Next slide"),
|
||||
&mut view.layout.next,
|
||||
&mut layout.next,
|
||||
30.,
|
||||
160.,
|
||||
"Relative size",
|
||||
|
|
@ -1552,7 +1609,7 @@ fn presenter_view(
|
|||
widget(
|
||||
ui,
|
||||
tr(&locale, "Notes"),
|
||||
&mut view.layout.notes,
|
||||
&mut layout.notes,
|
||||
12.,
|
||||
65.,
|
||||
"Space (%)",
|
||||
|
|
@ -1564,18 +1621,18 @@ fn presenter_view(
|
|||
widget(
|
||||
ui,
|
||||
tr(&locale, "Elapsed time"),
|
||||
&mut view.layout.elapsed,
|
||||
&mut layout.elapsed,
|
||||
16.,
|
||||
320.,
|
||||
"Text size",
|
||||
);
|
||||
ui.add_enabled_ui(view.layout.elapsed.show, |ui| {
|
||||
ui.add_enabled_ui(layout.elapsed.show, |ui| {
|
||||
ui.horizontal_wrapped(|ui| {
|
||||
ui.label(tr(&locale, "Elapsed time position"));
|
||||
timer_position(
|
||||
ui,
|
||||
"elapsed-position",
|
||||
&mut view.layout.elapsed_position,
|
||||
&mut layout.elapsed_position,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
|
@ -1583,40 +1640,40 @@ fn presenter_view(
|
|||
widget(
|
||||
ui,
|
||||
tr(&locale, "Time · HH:MM"),
|
||||
&mut view.layout.clock,
|
||||
&mut layout.clock,
|
||||
16.,
|
||||
320.,
|
||||
"Text size",
|
||||
);
|
||||
ui.add_enabled_ui(view.layout.clock.show, |ui| {
|
||||
ui.add_enabled_ui(layout.clock.show, |ui| {
|
||||
ui.horizontal_wrapped(|ui| {
|
||||
ui.label(tr(&locale, "Clock position"));
|
||||
timer_position(
|
||||
ui,
|
||||
"clock-position",
|
||||
&mut view.layout.clock_position,
|
||||
&mut layout.clock_position,
|
||||
);
|
||||
});
|
||||
});
|
||||
ui.separator();
|
||||
ui.checkbox(
|
||||
&mut view.layout.slide_progress,
|
||||
&mut layout.slide_progress,
|
||||
tr(&locale, "Slide progress bar"),
|
||||
);
|
||||
ui.add_enabled(
|
||||
view.layout.slide_progress,
|
||||
egui::Slider::new(&mut view.layout.slide_progress_height, 8. ..=120.)
|
||||
layout.slide_progress,
|
||||
egui::Slider::new(&mut layout.slide_progress_height, 8. ..=120.)
|
||||
.text(tr(&locale, "Bar height")),
|
||||
);
|
||||
});
|
||||
layout_section(ui, tr(&locale, "Header and footer"), |ui| {
|
||||
ui.horizontal_wrapped(|ui| {
|
||||
ui.checkbox(
|
||||
&mut view.layout.header,
|
||||
&mut layout.header,
|
||||
tr(&locale, "Keep header visible"),
|
||||
);
|
||||
ui.checkbox(
|
||||
&mut view.layout.footer,
|
||||
&mut layout.footer,
|
||||
tr(&locale, "Keep footer visible"),
|
||||
);
|
||||
});
|
||||
|
|
@ -1633,14 +1690,14 @@ fn presenter_view(
|
|||
button(
|
||||
ui,
|
||||
tr(&locale, "Save layout · This project"),
|
||||
display.map_or(Action::SaveProject, |display| Action::SaveDisplayLayout { display: display.into(), project: true, layout: view.layout.clone() }),
|
||||
rendered_layout_display.as_deref().map_or(Action::SaveProject, |display| Action::SaveDisplayLayout { display: display.into(), project: true, layout: layout.clone() }),
|
||||
&mut s.actions,
|
||||
);
|
||||
});
|
||||
button(
|
||||
ui,
|
||||
tr(&locale, "Save layout · All projects"),
|
||||
display.map_or(Action::SaveGlobal, |display| Action::SaveDisplayLayout { display: display.into(), project: false, layout: view.layout.clone() }),
|
||||
rendered_layout_display.as_deref().map_or(Action::SaveGlobal, |display| Action::SaveDisplayLayout { display: display.into(), project: false, layout: layout.clone() }),
|
||||
&mut s.actions,
|
||||
);
|
||||
});
|
||||
|
|
@ -1649,7 +1706,7 @@ fn presenter_view(
|
|||
button(
|
||||
ui,
|
||||
tr(&locale, "Use all-projects default"),
|
||||
display.map_or(Action::UseGlobal, |display| Action::UseDisplayDefault(display.into())),
|
||||
rendered_layout_display.as_deref().map_or(Action::UseGlobal, |display| Action::UseDisplayDefault(display.into())),
|
||||
&mut s.actions,
|
||||
);
|
||||
});
|
||||
|
|
@ -1657,6 +1714,14 @@ fn presenter_view(
|
|||
});
|
||||
});
|
||||
view.layout_open = open;
|
||||
view.layout_target = selected_layout_display;
|
||||
if let Some(remote_view) = remote_view {
|
||||
if remote_layout_before.as_ref() != Some(&remote_view.layout) {
|
||||
s.presenter_views_dirty = true;
|
||||
}
|
||||
s.presenter_views
|
||||
.insert(rendered_layout_display.unwrap(), remote_view);
|
||||
}
|
||||
}
|
||||
if s.displays_open {
|
||||
let mut open = true;
|
||||
|
|
@ -1722,7 +1787,7 @@ fn presenter_view(
|
|||
for (i, name) in [
|
||||
tr(&locale, "Unused"),
|
||||
tr(&locale, "Presenter"),
|
||||
tr(&locale, "Presentation"),
|
||||
tr(&locale, "Slides"),
|
||||
]
|
||||
.iter()
|
||||
.enumerate()
|
||||
|
|
@ -1755,7 +1820,7 @@ fn presenter_view(
|
|||
);
|
||||
ui.checkbox(
|
||||
&mut s.draft_presentation_fullscreen,
|
||||
tr(&locale, "Presentation fullscreen"),
|
||||
tr(&locale, "Slides fullscreen"),
|
||||
);
|
||||
button(
|
||||
ui,
|
||||
|
|
@ -2409,7 +2474,7 @@ fn menu(ui: &mut Ui, s: &mut Studio) {
|
|||
ui.menu_button(tr(&locale,"Preferences"), |ui| {
|
||||
ui.with_layout(egui::Layout::top_down(egui::Align::Min), |ui| {
|
||||
ui.set_width(370.);
|
||||
ui.collapsing(if s.settings.language.french() { "Image de présentation masquée" } else { "Blank presentation" }, |ui| {
|
||||
ui.collapsing(if s.settings.language.french() { "Image des diapositives masquées" } else { "Blank slides" }, |ui| {
|
||||
ui.label(if s.settings.blank_picture {
|
||||
if s.settings.language.french() { "Image personnalisée sélectionnée" } else { "Custom picture selected" }
|
||||
} else if s.settings.language.french() { "Écran noir" } else { "Solid black" });
|
||||
|
|
@ -2419,7 +2484,7 @@ fn menu(ui: &mut Ui, s: &mut Studio) {
|
|||
if ui.add_enabled(s.initialized && !s.dialog_busy && (s.settings.blank_picture || s.blank_busy), egui::Button::new(if s.settings.language.french() { "Utiliser un écran noir" } else { "Use solid black" })).clicked() {
|
||||
s.actions.push(Action::ClearBlankPicture);
|
||||
}
|
||||
ui.small(if s.settings.language.french() { "Une copie est conservée et ajustée à tous les écrans de présentation, sur fond noir." } else { "A copy is saved and fitted to all presentation displays against a black background." });
|
||||
ui.small(if s.settings.language.french() { "Une copie est conservée et ajustée à tous les écrans Diapositives, sur fond noir." } else { "A copy is saved and fitted to all Slides screens against a black background." });
|
||||
if s.blank_busy { ui.spinner(); }
|
||||
});
|
||||
ui.separator();
|
||||
|
|
@ -2442,7 +2507,7 @@ fn menu(ui: &mut Ui, s: &mut Studio) {
|
|||
ui.small(tr(&locale, "By default, zoom expands the page to fill the screen without stretching. Enable this option to keep the original page-shaped area."));
|
||||
ui.small(tr(&locale, "Zoom reuses buffered images: no extra PDF rendering or image memory. Enlarged slides may look softer. Software drawing can slow down on large or multiple displays."));
|
||||
ui.separator();
|
||||
if ui.checkbox(&mut s.settings.auto_show,tr(&locale,"Show presentation automatically when opening a document")).changed() {s.save_preferences();}
|
||||
if ui.checkbox(&mut s.settings.auto_show,tr(&locale,"Show slides automatically when opening a document")).changed() {s.save_preferences();}
|
||||
ui.separator();
|
||||
ui.label(tr(&locale,"RAM budget per process (presenter + output each use this allowance):"));
|
||||
if ui.add(egui::Slider::new(&mut s.settings.buffer_mib,64..=16384).text("MiB")).changed() {s.remember_buffer_budget();}
|
||||
|
|
@ -2469,12 +2534,23 @@ fn menu(ui: &mut Ui, s: &mut Studio) {
|
|||
if s.settings.zoom_enabled {
|
||||
ui.menu_button(tr(&locale, "Page zoom"), |ui| {
|
||||
let mut scale = s.zoom.view.scale;
|
||||
if ui.add(egui::Slider::new(&mut scale, 1.0..=8.0).text("×")).changed() {
|
||||
if ui
|
||||
.add(egui::Slider::new(&mut scale, 1.0..=8.0).text("×"))
|
||||
.changed()
|
||||
{
|
||||
s.set_zoom_from_action(s.zoom.view.zoom_at(scale, [0.5; 2]));
|
||||
}
|
||||
if ui.button(tr(&locale, "Reset zoom")).clicked() { s.set_zoom_from_action(Default::default()); }
|
||||
ui.small(tr(&locale, "Scroll to zoom · drag to pan · double-click to fit width / reset"));
|
||||
ui.small(tr(&locale, "Use the current slide preview or a presentation screen. Changing slides resets zoom."));
|
||||
if ui.button(tr(&locale, "Reset zoom")).clicked() {
|
||||
s.set_zoom_from_action(Default::default());
|
||||
}
|
||||
ui.small(tr(
|
||||
&locale,
|
||||
"Scroll to zoom · drag to pan · double-click to fit width / reset",
|
||||
));
|
||||
ui.small(tr(
|
||||
&locale,
|
||||
"Use the current slide preview or a Slides screen. Changing slides resets zoom.",
|
||||
));
|
||||
});
|
||||
}
|
||||
ui.separator();
|
||||
|
|
@ -2499,10 +2575,7 @@ pub fn output_display_recovery(
|
|||
egui::Sense::click(),
|
||||
)
|
||||
.context_menu(|ui| {
|
||||
if ui
|
||||
.button("Swap presenter and presentation displays…")
|
||||
.clicked()
|
||||
{
|
||||
if ui.button("Swap Presenter and Slides screens…").clicked() {
|
||||
action = Some(DisplayAction::Swap);
|
||||
ui.close();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,12 +92,14 @@ pub struct RouteTrial {
|
|||
pub struct PresenterView {
|
||||
pub layout: Layout,
|
||||
pub layout_open: bool,
|
||||
pub layout_target: Option<String>,
|
||||
pub menu_open: bool,
|
||||
}
|
||||
pub struct Studio {
|
||||
pub settings: Settings,
|
||||
pub layout: Layout,
|
||||
pub presenter_views: HashMap<String, PresenterView>,
|
||||
pub presenter_views_dirty: bool,
|
||||
pub monitors: Vec<Monitor>,
|
||||
pub routes: Routes,
|
||||
pub draft_routes: Routes,
|
||||
|
|
@ -211,6 +213,7 @@ impl Studio {
|
|||
settings: Settings::default(),
|
||||
layout: Layout::default(),
|
||||
presenter_views: HashMap::new(),
|
||||
presenter_views_dirty: false,
|
||||
monitors: vec![],
|
||||
routes: Routes::default(),
|
||||
draft_routes: Routes::default(),
|
||||
|
|
@ -459,7 +462,7 @@ impl Studio {
|
|||
self.settings.blank_picture = false;
|
||||
self.new_output = true;
|
||||
self.pending_save = true;
|
||||
self.status = "Blank presentation uses solid black.".into();
|
||||
self.status = "Blank slides use solid black.".into();
|
||||
}
|
||||
#[cfg(target_os = "windows")]
|
||||
Action::RegisterPdfAssociation => {
|
||||
|
|
@ -966,7 +969,7 @@ impl Studio {
|
|||
self.settings.blank_picture = true;
|
||||
self.pending_save |= c.tag == 1;
|
||||
self.new_output = true;
|
||||
self.status = "Blank presentation picture ready.".into();
|
||||
self.status = "Blank slides picture ready.".into();
|
||||
}
|
||||
Err(error) => self.status = format!("Blank picture: {error}"),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -380,7 +380,7 @@ fn output_recovery_buttons_dispatch_without_presenter_data() {
|
|||
for (label, trial) in [
|
||||
("Keep changes", true),
|
||||
("Revert now", true),
|
||||
("Swap presenter and presentation displays…", false),
|
||||
("Swap Presenter and Slides screens…", false),
|
||||
] {
|
||||
let ctx = Context::default();
|
||||
let size = Vec2::new(1280., 720.);
|
||||
|
|
@ -437,7 +437,7 @@ fn output_recovery_buttons_dispatch_without_presenter_data() {
|
|||
("Keep changes", Some(DisplayAction::Keep))
|
||||
| ("Revert now", Some(DisplayAction::Revert))
|
||||
| (
|
||||
"Swap presenter and presentation displays…",
|
||||
"Swap Presenter and Slides screens…",
|
||||
Some(DisplayAction::Swap)
|
||||
)
|
||||
));
|
||||
|
|
@ -520,10 +520,7 @@ fn nested_settings_remain_interactive_and_menu_still_dismisses() {
|
|||
assert!(s.menu_open);
|
||||
click(&mut s, "Preferences");
|
||||
let auto_show = s.settings.auto_show;
|
||||
click(
|
||||
&mut s,
|
||||
"Show presentation automatically when opening a document",
|
||||
);
|
||||
click(&mut s, "Show slides automatically when opening a document");
|
||||
assert_eq!(s.settings.auto_show, !auto_show);
|
||||
assert!(s.menu_open);
|
||||
click(&mut s, "Disk cache");
|
||||
|
|
@ -1700,3 +1697,89 @@ fn presenter_layouts_are_display_scoped_and_save_actions_keep_the_origin() {
|
|||
s.presenter_views.clear();
|
||||
assert_eq!(s.take_presenter_view("two").layout, restored);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn any_presenter_can_edit_and_save_another_presenter_layout() {
|
||||
fn find(shape: &egui::Shape, label: &str) -> Option<Pos2> {
|
||||
match shape {
|
||||
egui::Shape::Text(text) if text.galley.text() == label => {
|
||||
Some(text.pos + text.galley.size() * 0.5)
|
||||
}
|
||||
egui::Shape::Vec(shapes) => shapes.iter().find_map(|shape| find(shape, label)),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
let mut s = studio();
|
||||
s.routes.presenter = vec!["one".into(), "two".into()];
|
||||
s.routes.presentation.clear();
|
||||
let mut first = s.take_presenter_view("one");
|
||||
let first_layout = first.layout.clone();
|
||||
first.layout_open = true;
|
||||
first.layout_target = Some("two".into());
|
||||
s.presenter_views.insert("one".into(), first);
|
||||
let second = s.take_presenter_view("two");
|
||||
assert!(second.layout.notes.show);
|
||||
s.presenter_views.insert("two".into(), second);
|
||||
|
||||
let ctx = Context::default();
|
||||
let mut native = UiState::default();
|
||||
let size = Vec2::new(1400., 1000.);
|
||||
let mut initial = ctx.run_ui(input(size), |ui| {
|
||||
presenter_ui::presenter_on_display(ui, &mut s, &mut native, "one")
|
||||
});
|
||||
for _ in 0..2 {
|
||||
initial = ctx.run_ui(input(size), |ui| {
|
||||
presenter_ui::presenter_on_display(ui, &mut s, &mut native, "one")
|
||||
});
|
||||
}
|
||||
for label in ["Edit layout for", "Display 2 · Secondary", "Slide focus"] {
|
||||
assert!(
|
||||
initial
|
||||
.shapes
|
||||
.iter()
|
||||
.any(|shape| find(&shape.shape, label).is_some()),
|
||||
"missing layout target control: {label}"
|
||||
);
|
||||
}
|
||||
|
||||
let mut click = |label: &str| {
|
||||
let mut output = ctx.run_ui(input(size), |ui| {
|
||||
presenter_ui::presenter_on_display(ui, &mut s, &mut native, "one")
|
||||
});
|
||||
for _ in 0..2 {
|
||||
output = ctx.run_ui(input(size), |ui| {
|
||||
presenter_ui::presenter_on_display(ui, &mut s, &mut native, "one")
|
||||
});
|
||||
}
|
||||
let position = output
|
||||
.shapes
|
||||
.iter()
|
||||
.find_map(|shape| find(&shape.shape, label))
|
||||
.unwrap();
|
||||
for pressed in [true, false] {
|
||||
let mut raw = input(size);
|
||||
raw.events = vec![
|
||||
egui::Event::PointerMoved(position),
|
||||
egui::Event::PointerButton {
|
||||
pos: position,
|
||||
button: egui::PointerButton::Primary,
|
||||
pressed,
|
||||
modifiers: Default::default(),
|
||||
},
|
||||
];
|
||||
let _ = ctx.run_ui(raw, |ui| {
|
||||
presenter_ui::presenter_on_display(ui, &mut s, &mut native, "one")
|
||||
});
|
||||
}
|
||||
};
|
||||
click("Slide focus");
|
||||
click("Save layout · All projects");
|
||||
drop(click);
|
||||
|
||||
assert_eq!(s.presenter_views["one"].layout, first_layout);
|
||||
assert!(!s.presenter_views["two"].layout.notes.show);
|
||||
assert!(s.presenter_views_dirty);
|
||||
assert!(s.actions.iter().any(
|
||||
|action| matches!(action, Action::SaveDisplayLayout { display, .. } if display == "two")
|
||||
));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,17 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
### 0.1.79
|
||||
|
||||
- Name the two display roles **Presenter** and **Slides** throughout the user-facing
|
||||
interface and guide, while preserving existing settings and command-line fields.
|
||||
- Add an **Edit layout for** selector to every Presenter layout window. Any Presenter
|
||||
can edit another connected Presenter screen live, and project/global save or reset
|
||||
actions remain scoped to the selected screen.
|
||||
- Validation: formatting, Clippy, workspace tests, build, rustdoc and Python helper
|
||||
tests pass. Headless line coverage is 68.66%; physical multi-screen behavior still
|
||||
requires desktop validation.
|
||||
|
||||
### 0.1.78
|
||||
|
||||
- Reuse one bounded base framebuffer per presentation window for pointer and
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ The executable includes the renderer, image codecs, fonts and window icon.
|
|||
No runtime downloads or separately installed PDF renderer are required.
|
||||
Linux uses the system desktop services and X11/Wayland libraries.
|
||||
Run --licenses for bundled dependency notices. Open PDFs or picture folders
|
||||
from Menu. Both presenter and presentation windows start fullscreen.
|
||||
from Menu. Both Presenter and Slides windows start fullscreen.
|
||||
|
||||
Physical display, sleep prevention and clean-machine acceptance remain open.
|
||||
This is a preview for testing, not a claim of production readiness.
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ fullscreen for the session. `--list-monitors` lists CLI display numbers.
|
|||
## Screens and presentation safety
|
||||
|
||||
Both roles default to fullscreen. Displays lists connected screens: assign each
|
||||
Unused, Presenter or Presentation, including several screens per role. Swap groups
|
||||
Unused, Presenter or Slides, including several screens per role. Swap groups
|
||||
exchanges the draft roles. **Apply changes** previews the assignments
|
||||
and fullscreen choices while preserving the current output visibility. **Keep changes** confirms and saves;
|
||||
**Revert now**, Escape, or doing nothing for 15 seconds restores the previous setup.
|
||||
|
|
@ -57,9 +57,9 @@ Disabling either fullscreen option shows a positioning warning. Window placement
|
|||
can be unreliable in windowed mode, especially on Linux; switch back to fullscreen
|
||||
if you experience positioning issues.
|
||||
|
||||
Before the first explicit slide navigation or Show presentation action, right-click
|
||||
either screen for **Swap displays…** (on output: **Swap presenter and presentation
|
||||
displays…**). This uses the same timed trial. Merely opening a PDF and automatically
|
||||
Before the first explicit slide navigation or Show slides action, right-click
|
||||
either screen for **Swap displays…** (on output: **Swap Presenter and Slides
|
||||
screens…**). This uses the same timed trial. Merely opening a PDF and automatically
|
||||
showing its first slide does not disable startup recovery. Once you start navigating
|
||||
or explicitly showing slides, the output startup menu disappears; use Displays on
|
||||
the presenter for later changes. Startup swap exchanges whole role groups, including
|
||||
|
|
@ -68,22 +68,23 @@ Confirmation and rollback preserve output visibility, including an explicit manu
|
|||
Unavailable screens fall back to surviving assignments and available distinct screens;
|
||||
the preferred saved setup remains available for reconnection. Review the setup after
|
||||
connecting/disconnecting displays: output visibility is preserved on available outputs.
|
||||
If the operator screen disappears and only previous presentation screens remain, the
|
||||
If the Presenter screen disappears and only previous Slides screens remain, the
|
||||
presenter is withheld to protect notes. Reconnect an operator screen, or restart in
|
||||
windowed rehearsal after verifying privacy. Duplicate monitor names are distinguished
|
||||
by enumeration order; verify identical models.
|
||||
|
||||
Output is enabled by default when opening a document. Menu → Preferences → Show presentation
|
||||
automatically lets you save an opt-out. **Show presentation** restores blanked output; **Blank presentation** or B hides it. Navigation
|
||||
Output is enabled by default when opening a document. Menu → Preferences → Show slides
|
||||
automatically lets you save an opt-out. **Show slides** restores blanked output; **Blank slides** or B hides it. Navigation
|
||||
preserves blanking. Until an uncached requested slide is ready, output holds the last
|
||||
usable frame. The footer distinguishes requested and acknowledged displayed slides. A red
|
||||
**NO OUTPUT DISPLAYED** warning marks blanking, no assigned output or no document;
|
||||
it remains visible when the footer is hidden. Preparing output has a separate status.
|
||||
Escape cancels a pending slide number/menu or closes the browser; it does not
|
||||
leave presenter fullscreen or blank the presentation. Use **Enter fullscreen /
|
||||
leave Presenter fullscreen or blank Slides. Use **Enter fullscreen /
|
||||
Exit fullscreen** in the header to toggle both display roles. Like other
|
||||
display changes, this previews the change with Keep/Revert confirmation. While the presenter is connected, closing a presentation window blanks it; close a
|
||||
presenter or choose Menu → Quit to end the application.
|
||||
display changes, this previews the change with Keep/Revert confirmation. While a
|
||||
Presenter is connected, closing a Slides window blanks it; close a Presenter or
|
||||
choose Menu → Quit to end the application.
|
||||
|
||||
Arrow keys and Page Up/Down navigate from the presenter or All slides, including
|
||||
while a presenter menu is open. Space moves forward; Shift+Space moves back. Notes
|
||||
|
|
@ -119,9 +120,10 @@ navigation or zoom.
|
|||
|
||||
## Layout and notes
|
||||
|
||||
Each presenter display has its own Layout controls and saved layout. Open Layout
|
||||
on the display you want to customize; the panel identifies that display. Presets,
|
||||
widget visibility/sizes/positions and header/footer settings affect only that screen.
|
||||
Each Presenter screen has its own Layout controls and saved layout. Open Layout on
|
||||
any Presenter, then use **Edit layout for** to choose the Presenter screen you want
|
||||
to customize. Changes appear on that screen immediately. Presets, widget
|
||||
visibility/sizes/positions and header/footer settings affect only the selected screen.
|
||||
|
||||
Layout independently enables and sizes previous/current/next slides, notes, elapsed
|
||||
time and the local HH:MM clock. Hidden widgets release their space. Notes wrap and
|
||||
|
|
@ -240,7 +242,7 @@ dependency/font notices without launching a window.
|
|||
## Appearance and language
|
||||
|
||||
Menu opens a dropdown below its button; click outside or press Escape to dismiss it.
|
||||
Displays uses numbered screen cards with direct Unused / Presenter / Presentation
|
||||
Displays uses numbered screen cards with direct Unused / Presenter / Slides
|
||||
choices. Repeat a role to mirror it, then choose **Apply changes** and confirm with
|
||||
**Keep changes**.
|
||||
|
||||
|
|
@ -275,7 +277,7 @@ Timers and progress, choose **Elapsed time** or **Countdown** and set a countdow
|
|||
in minutes and seconds (up to 24 hours). **Start on first action** is enabled by
|
||||
default: timing begins on the first presentation action after opening or resetting.
|
||||
Automatic output after opening a document does not count. Turn it off for manual start.
|
||||
Rehearsal without an output screen starts on explicit navigation or Show presentation.
|
||||
Rehearsal without a Slides screen starts on explicit navigation or Show slides.
|
||||
Merely displaying the initial slide does not start it. Loading a new source resets the
|
||||
timer; pausing is never undone by slide navigation.
|
||||
Countdown stops at zero. Changing mode, duration or autostart resets the timer.
|
||||
|
|
@ -323,7 +325,7 @@ window-rule {
|
|||
```
|
||||
|
||||
See [Niri window rules](https://github.com/niri-wm/niri/wiki/Configuration%3A-Window-Rules).
|
||||
The rule targets only All slides, not presenter or audience windows.
|
||||
The rule targets only All slides, not Presenter or Slides windows.
|
||||
|
||||
In All slides, double-click a thumbnail to open a larger, resizable preview inside
|
||||
the browser. It does not change the presentation. Close it with its X or Escape.
|
||||
|
|
@ -377,11 +379,11 @@ the original page-shaped area and its margins, enable **Menu → Preferences →
|
|||
Keep fitted page area when zooming**. This choice is saved globally. It changes
|
||||
the visible area, not the cached image resolution.
|
||||
|
||||
- On the **current slide preview** or any **presentation screen**, scroll up/down
|
||||
- On the **current slide preview** or any **Slides screen**, scroll up/down
|
||||
to zoom in/out (1×–8×). The point under the mouse stays anchored when possible.
|
||||
- Hold the left mouse button and drag to move the enlarged image. Movement stops
|
||||
at the page edges. When viewing the whole page, **double-click to fit its width**
|
||||
to the presentation screen (up to 8×) and aim the crop near the point clicked.
|
||||
to the Slides screen (up to 8×) and aim the crop near the point clicked.
|
||||
Near page edges, the crop stops at the edge as closely as possible. Double-click again
|
||||
while zoomed to reset to the complete fitted page. Pages already filling the
|
||||
width stay unchanged. The optional fixed page area still applies if enabled.
|
||||
|
|
@ -420,10 +422,10 @@ background. Active decks are protected and may temporarily exceed either limit.
|
|||
The cleanup report shows removed and remaining data; deleted slides regenerate
|
||||
when reopened. Source documents and presenter notes are preserved.
|
||||
|
||||
Choose **Preferences → Blank presentation → Choose picture…** to replace the
|
||||
black blanking screen with your own picture on every audience display. The app
|
||||
Choose **Preferences → Blank slides → Choose picture…** to replace the
|
||||
black blanking screen with your own picture on every Slides screen. The app
|
||||
saves a copy, fits the whole image against black, and remembers it across restarts.
|
||||
The original may then be moved or removed. Use **Use solid black** to reset.
|
||||
Pictures are resized to at most 2048 pixels per edge; animated images use a still
|
||||
frame. Slide zoom, annotations and slide background colors do not affect it.
|
||||
The existing Blank presentation button and B shortcut still hide/show slides.
|
||||
The existing Blank slides button and B shortcut still hide/show slides.
|
||||
|
|
|
|||
Loading…
Reference in New Issue