Compare commits

...

32 Commits

Author SHA1 Message Date
Dandaedre bf8c57c344 Prepare Deckstride 0.1.101 release
Gitea/Deckstride/pipeline/head This commit looks good Details
2026-11-21 16:18:55 +01:00
Dandaedre 00c8ed0697 Add importable language and theme packs 2026-11-21 16:11:51 +01:00
Dandaedre 3ca73d86cd Keep preferences window size stable
Gitea/Deckstride/pipeline/head This commit looks good Details
2026-11-21 15:35:07 +01:00
Dandaedre d41b8ab614 Organize preferences into tabs
Gitea/Deckstride/pipeline/head This commit looks good Details
2026-11-21 15:28:20 +01:00
Dandaedre aad895bc61 Shorten presenter menu 2026-11-21 15:23:45 +01:00
Dandaedre 2f98df4674 Configure releases for Gitea and GitHub 2026-11-21 15:11:56 +01:00
Dandaedre 89df5c2fe8 Prepare Deckstride 0.1.96 release
Gitea/Deckstride/pipeline/head This commit looks good Details
2026-11-21 11:50:45 +01:00
Dandaedre 9fef5f12ef Rename application to Deckstride 2026-11-21 11:48:27 +01:00
Dandaedre 56672964b3 Add resilient slide autoplay controls
Gitea/Deckstride/pipeline/head This commit looks good Details
2026-11-21 11:11:58 +01:00
Dandaedre 621d9d3d51 Show portable executable path in preferences 2026-11-21 11:04:19 +01:00
Dandaedre 92e3466d47 Show source path in presenter footer 2026-11-21 10:58:09 +01:00
Dandaedre 9ca908e88d feat: add fast built-in interface languages 2026-11-21 08:27:12 +01:00
Dandaedre 5e1bebdbd5 release: add ARM and macOS stable targets
Gitea/pdf-presenter/pipeline/head This commit looks good Details
2026-11-21 08:00:06 +01:00
Dandaedre 044bdf1807 release: prepare v0.1.90 Linux and Windows preview
Gitea/pdf-presenter/pipeline/head This commit looks good Details
2026-11-21 07:40:31 +01:00
Dandaedre 0e8f5d952b feat: add explicit single-screen view and startup-only offer 2026-11-21 07:32:43 +01:00
Dandaedre 0cbd6f2607 feat: confirm quit requests from Escape and Ctrl+Q 2026-11-21 07:17:12 +01:00
Dandaedre fbdd1d2654 feat: add per-screen fullscreen and windowed overrides 2026-11-21 07:13:15 +01:00
Dandaedre db39451ab3 feat: swap display roles with a one-second S hold 2026-11-21 07:09:45 +01:00
Dandaedre 57c85b3af2 docs: document cargo binstall installation from releases 2026-11-21 07:07:36 +01:00
Dandaedre 0af6476eaf Rewrite README around presenter workflows
Gitea/pdf-presenter/pipeline/head This commit looks good Details
2026-11-20 18:09:02 +01:00
Dandaedre ae3daeedf9 Use macOS SDK-compatible system probe
Gitea/pdf-presenter/pipeline/head There was a failure building this commit Details
2026-11-20 17:52:44 +01:00
Dandaedre 2c2782ed68 Pin macOS-compatible system probe dependency
Gitea/pdf-presenter/pipeline/head This commit looks good Details
2026-11-20 17:42:59 +01:00
Dandaedre 86f03305ca Add macOS to 0.1.83 release notes
Gitea/pdf-presenter/pipeline/head This commit looks good Details
2026-11-20 17:36:01 +01:00
Dandaedre c546631845 Add 0.1.83 release notes 2026-11-20 17:33:31 +01:00
Dandaedre 3aa4f16bd1 Scale tool sizes with slide resolution 2026-11-20 17:28:27 +01:00
Dandaedre 8d7fee6984 Scale tool previews to Slides viewport 2026-11-20 17:25:37 +01:00
Dandaedre 0b470ea626 Move advanced settings into Preferences window 2026-11-20 17:16:35 +01:00
Dandaedre 3711db148c docs: disclose open-source and LLM-assisted development
Gitea/pdf-presenter/pipeline/head This commit looks good Details
2026-11-20 16:48:07 +01:00
Dandaedre 5681b1cb72 Add 0.1.81 release notes
Gitea/pdf-presenter/pipeline/head This commit looks good Details
2026-11-20 15:19:24 +01:00
Dandaedre 0d10f7d0ba Retry Presenter focus during Windows startup
Gitea/pdf-presenter/pipeline/head This commit looks good Details
2026-11-20 15:00:18 +01:00
Dandaedre b3470dfded Expose default PDF application setting 2026-11-20 14:54:32 +01:00
Dandaedre 2d7c95674c Rename display roles and edit layouts across presenters 2026-11-20 14:51:40 +01:00
108 changed files with 7517 additions and 1527 deletions

View File

@ -1,4 +1,4 @@
# PDF Presenter
# Deckstride
Standalone Rust application foundation for multiscreen PDF presentation. Read
`AGENT_DOCUMENTATION.md` and `docs/development/plan.md` before implementing behavior.
@ -8,12 +8,12 @@ Physical display, performance, sleep and clean-machine acceptance remain open.
## Structure and intended architecture
- `crates/pdf-presenter/src/lib.rs`: tested, UI-independent presentation state.
- `crates/deckstride/src/lib.rs`: tested, UI-independent presentation state.
- `src/main.rs` in that crate: CLI/native entry point. `native.rs` owns windows, `presenter_ui.rs` controls, `studio.rs` shared state,
`document.rs` rendering, `worker.rs` supervised jobs, `output.rs` independent host/leases,
`settings.rs` persistence. `desktop.rs`/`poc.rs`/`paint.rs` retain the display diagnostic.
- `crates/pdf-presenter/tests/`: meaningful behavior tests, including boundary cases.
- `crates/pdf-presenter/assets/`: generated app artwork and provenance.
- `crates/deckstride/tests/`: meaningful behavior tests, including boundary cases.
- `crates/deckstride/assets/`: generated app artwork and provenance.
- `scripts/`, `tests/`, `Jenkinsfile`: standalone validation and badge publication.
- `docs/development/`: architecture decisions, implementation plan and CI setup.
- `docs/interfaces/`: persistent-format contracts when formats are introduced.
@ -85,7 +85,7 @@ for Windows/macOS artifacts do not authorize rebuilding them on every later task
Report platform validation that was not run accurately; do not imply it passed.
CI uses `rust_no_docker`; it archives exactly three badge SVGs and only main/non-PR
builds publish to `/mnt/assets/coverage/idle-org/pdf-presenter/main/`. No automatic
builds publish to `/mnt/assets/coverage/idle-org/deckstride/main/`. No automatic
releases, binaries or manual publication. Jenkins job creation is external setup.
Never modify another tool's badges or the shared manuals root.

253
Cargo.lock generated
View File

@ -95,6 +95,15 @@ dependencies = [
"libc",
]
[[package]]
name = "arbitrary"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3bc62ac97cc33321f50863d514c3bc38a453947a8f9e781137e47c7401020aed"
dependencies = [
"derive_arbitrary",
]
[[package]]
name = "arrayref"
version = "0.3.9"
@ -471,7 +480,7 @@ dependencies = [
"js-sys",
"num-traits",
"wasm-bindgen",
"windows-link",
"windows-link 0.2.1",
]
[[package]]
@ -668,6 +677,49 @@ dependencies = [
"syn 2.0.119",
]
[[package]]
name = "deckstride"
version = "0.1.101"
dependencies = [
"bytemuck",
"chrono",
"directories",
"egui",
"egui-winit",
"egui_software_backend",
"font8x8",
"hayro",
"image",
"keepawake",
"libc",
"rfd",
"serde",
"serde_json",
"sha2",
"softbuffer",
"sys-locale",
"sysinfo",
"tempfile",
"toml 0.8.23",
"wayland-client",
"wayland-protocols",
"winit",
"winresource",
"x11-dl",
"zip",
]
[[package]]
name = "derive_arbitrary"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b034bd7d5f032402a2479444dcc6f74e36a03f31854d41680fb240ef682a1ac"
dependencies = [
"proc-macro2",
"quote",
"syn 3.0.10",
]
[[package]]
name = "derive_builder"
version = "0.20.2"
@ -1171,7 +1223,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8"
dependencies = [
"rustix 1.1.6",
"windows-link",
"windows-link 0.2.1",
]
[[package]]
@ -1393,7 +1445,7 @@ dependencies = [
"js-sys",
"log",
"wasm-bindgen",
"windows-core",
"windows-core 0.62.2",
]
[[package]]
@ -1574,7 +1626,7 @@ dependencies = [
"simd_cesu8",
"thiserror 2.0.21",
"walkdir",
"windows-link",
"windows-link 0.2.1",
]
[[package]]
@ -1650,7 +1702,7 @@ dependencies = [
"objc2-core-foundation",
"objc2-io-kit",
"thiserror 2.0.21",
"windows",
"windows 0.62.2",
"zbus",
]
@ -1679,7 +1731,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55"
dependencies = [
"cfg-if",
"windows-link",
"windows-link 0.2.1",
]
[[package]]
@ -2240,38 +2292,7 @@ dependencies = [
"libc",
"redox_syscall 0.5.18",
"smallvec",
"windows-link",
]
[[package]]
name = "pdf-presenter"
version = "0.1.78"
dependencies = [
"bytemuck",
"chrono",
"directories",
"egui",
"egui-winit",
"egui_software_backend",
"font8x8",
"hayro",
"image",
"keepawake",
"libc",
"rfd",
"serde",
"serde_json",
"sha2",
"softbuffer",
"sys-locale",
"sysinfo",
"tempfile",
"toml 0.8.23",
"wayland-client",
"wayland-protocols",
"winit",
"winresource",
"x11-dl",
"windows-link 0.2.1",
]
[[package]]
@ -3060,16 +3081,16 @@ dependencies = [
[[package]]
name = "sysinfo"
version = "0.39.6"
version = "0.37.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d2071df9448915b71c4fe6d25deaf1c22f12bd234f01540b77312bb8e41361e6"
checksum = "16607d5caffd1c07ce073528f9ed972d88db15dd44023fa57142963be3feb11f"
dependencies = [
"libc",
"memchr",
"ntapi",
"objc2-core-foundation",
"objc2-io-kit",
"windows",
"windows 0.61.3",
]
[[package]]
@ -3704,16 +3725,38 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]]
name = "windows"
version = "0.61.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893"
dependencies = [
"windows-collections 0.2.0",
"windows-core 0.61.2",
"windows-future 0.2.1",
"windows-link 0.1.3",
"windows-numerics 0.2.0",
]
[[package]]
name = "windows"
version = "0.62.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580"
dependencies = [
"windows-collections",
"windows-core",
"windows-future",
"windows-numerics",
"windows-collections 0.3.2",
"windows-core 0.62.2",
"windows-future 0.3.2",
"windows-numerics 0.3.1",
]
[[package]]
name = "windows-collections"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8"
dependencies = [
"windows-core 0.61.2",
]
[[package]]
@ -3722,7 +3765,20 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610"
dependencies = [
"windows-core",
"windows-core 0.62.2",
]
[[package]]
name = "windows-core"
version = "0.61.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3"
dependencies = [
"windows-implement",
"windows-interface",
"windows-link 0.1.3",
"windows-result 0.3.4",
"windows-strings 0.4.2",
]
[[package]]
@ -3733,9 +3789,20 @@ checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"
dependencies = [
"windows-implement",
"windows-interface",
"windows-link",
"windows-result",
"windows-strings",
"windows-link 0.2.1",
"windows-result 0.4.1",
"windows-strings 0.5.1",
]
[[package]]
name = "windows-future"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e"
dependencies = [
"windows-core 0.61.2",
"windows-link 0.1.3",
"windows-threading 0.1.0",
]
[[package]]
@ -3744,9 +3811,9 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb"
dependencies = [
"windows-core",
"windows-link",
"windows-threading",
"windows-core 0.62.2",
"windows-link 0.2.1",
"windows-threading 0.2.1",
]
[[package]]
@ -3771,20 +3838,45 @@ dependencies = [
"syn 2.0.119",
]
[[package]]
name = "windows-link"
version = "0.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"
[[package]]
name = "windows-link"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
[[package]]
name = "windows-numerics"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1"
dependencies = [
"windows-core 0.61.2",
"windows-link 0.1.3",
]
[[package]]
name = "windows-numerics"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26"
dependencies = [
"windows-core",
"windows-link",
"windows-core 0.62.2",
"windows-link 0.2.1",
]
[[package]]
name = "windows-result"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6"
dependencies = [
"windows-link 0.1.3",
]
[[package]]
@ -3793,7 +3885,16 @@ version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"
dependencies = [
"windows-link",
"windows-link 0.2.1",
]
[[package]]
name = "windows-strings"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57"
dependencies = [
"windows-link 0.1.3",
]
[[package]]
@ -3802,7 +3903,7 @@ version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"
dependencies = [
"windows-link",
"windows-link 0.2.1",
]
[[package]]
@ -3829,7 +3930,7 @@ version = "0.61.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
dependencies = [
"windows-link",
"windows-link 0.2.1",
]
[[package]]
@ -3848,13 +3949,22 @@ dependencies = [
"windows_x86_64_msvc",
]
[[package]]
name = "windows-threading"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6"
dependencies = [
"windows-link 0.1.3",
]
[[package]]
name = "windows-threading"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37"
dependencies = [
"windows-link",
"windows-link 0.2.1",
]
[[package]]
@ -4230,6 +4340,21 @@ dependencies = [
"syn 3.0.10",
]
[[package]]
name = "zip"
version = "2.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1dcb24d0152526ae49b9b96c1dcf71850ca1e0b882e4e28ed898a93c41334744"
dependencies = [
"arbitrary",
"crc32fast",
"crossbeam-utils",
"flate2",
"indexmap",
"memchr",
"zopfli",
]
[[package]]
name = "zlib-rs"
version = "0.6.8"
@ -4242,6 +4367,18 @@ version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
[[package]]
name = "zopfli"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aaf7fc5d30c28483d93805c4a5e12b05bbb52407fa67c5f8bd552374cd01fb11"
dependencies = [
"bumpalo",
"crc32fast",
"log",
"simd-adler32",
]
[[package]]
name = "zune-core"
version = "0.5.3"

View File

@ -1,13 +1,13 @@
[workspace]
members = ["crates/pdf-presenter"]
default-members = ["crates/pdf-presenter"]
members = ["crates/deckstride"]
default-members = ["crates/deckstride"]
resolver = "3"
[workspace.package]
version = "0.1.78"
version = "0.1.101"
edition = "2024"
license = "MIT"
repository = "https://proxy.dandaedre.com/gitea/idle-org/pdf-presenter"
repository = "https://proxy.dandaedre.com/gitea/idle-org/deckstride"
[profile.dev]
debug = 0

View File

@ -4,5 +4,8 @@ passthrough = ["RUSTUP_TOOLCHAIN"]
[target.x86_64-unknown-linux-gnu]
image = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main"
[target.aarch64-unknown-linux-musl]
image = "ghcr.io/cross-rs/aarch64-unknown-linux-musl:main"
[target.x86_64-pc-windows-gnu]
image = "ghcr.io/cross-rs/x86_64-pc-windows-gnu:main"

6
Jenkinsfile vendored
View File

@ -12,7 +12,7 @@ pipeline {
PYTHONUNBUFFERED = '1'
PYTHONDONTWRITEBYTECODE = '1'
NO_COLOR = '1'
PDF_PRESENTER_HEADLESS_CI = '1'
DECKSTRIDE_HEADLESS_CI = '1'
CARGO_TERM_COLOR = 'never'
BADGE_ROOT = '/mnt/assets/coverage'
}
@ -60,7 +60,7 @@ pipeline {
sh '''
set -eu
uv run --no-project --python ">=3.11" python -m unittest discover -s tests -v
unset PDF_PRESENTER_GUI_TESTS
unset DECKSTRIDE_GUI_TESTS
cargo test --locked --workspace --all-features
cargo build --locked --workspace --all-features
uv run --no-project --python ">=3.11" python scripts/ci.py tests-passed
@ -72,7 +72,7 @@ pipeline {
steps {
sh '''
set -eu
unset PDF_PRESENTER_GUI_TESTS
unset DECKSTRIDE_GUI_TESTS
uv run --no-project --python ">=3.11" python scripts/ci.py coverage
'''
}

220
README.md
View File

@ -1,104 +1,166 @@
<p align="center">
<img src="crates/pdf-presenter/assets/app-icon.png" width="96" height="96" alt="PDF Presenter icon">
<img src="crates/deckstride/assets/app-icon.png" width="96" height="96" alt="Deckstride icon">
</p>
<h1 align="center">PDF Presenter</h1>
<p align="center"><strong>Your slides on the big screen. Your notes and controls with you.</strong></p>
<h1 align="center">Deckstride</h1>
<p align="center"><strong>A fast, portable presenter for PDFs and picture folders.</strong></p>
<p align="center">Fullscreen slides for the room. Notes, previews and controls for you.</p>
<p align="center">
<a href="docs/changelog.md"><img src="https://assets.dandaedre.com/coverage/idle-org/pdf-presenter/main/version.svg" alt="Version"></a>
<a href="docs/development/ci.md"><img src="https://assets.dandaedre.com/coverage/idle-org/pdf-presenter/main/test.svg" alt="Tests"></a>
<a href="docs/development/ci.md"><img src="https://assets.dandaedre.com/coverage/idle-org/pdf-presenter/main/coverage.svg" alt="Coverage"></a>
<a href="docs/changelog.md"><img src="https://assets.dandaedre.com/coverage/idle-org/deckstride/main/version.svg" alt="Version"></a>
<a href="docs/development/ci.md"><img src="https://assets.dandaedre.com/coverage/idle-org/deckstride/main/test.svg" alt="Tests"></a>
<a href="docs/development/ci.md"><img src="https://assets.dandaedre.com/coverage/idle-org/deckstride/main/coverage.svg" alt="Coverage"></a>
</p>
<p align="center">
<a href="https://proxy.dandaedre.com/gitea/idle-org/pdf-presenter/releases"><strong>Download a release</strong></a> ·
<a href="docs/user-guide.md#install-and-update">Install and update</a> ·
<a href="https://proxy.dandaedre.com/gitea/idle-org/deckstride/releases"><strong>Download Deckstride</strong></a> ·
<a href="docs/user-guide.md">User guide</a> ·
<a href="https://proxy.dandaedre.com/gitea/idle-org/pdf-presenter/issues">Report an issue</a>
<a href="https://proxy.dandaedre.com/gitea/idle-org/deckstride/issues">Report an issue</a>
</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
across several displays.
Deckstride gives each connected screen a job: **Presenter**, **Slides**, or
**Unused**. Keep the current slide, next slide, notes and timers in front of you
while one or more other screens show only the presentation. You can also mirror the
Presenter view, rehearse on one monitor, or change the arrangement during a session.
## Download, extract, present
<p align="center">
<img src="docs/images/presenter-overview.png" alt="Presenter view showing the current slide, next slide, fitted notes, timer and navigation" width="100%">
</p>
Start with the [release downloads](https://proxy.dandaedre.com/gitea/idle-org/pdf-presenter/releases).
Choose a **portable** package for your computer; no Rust toolchain or separate PDF
renderer is needed.
The application is built around a simple requirement: advancing a slide should feel
immediate. Prepared slides are buffered in RAM, reusable processed images make a
second opening faster, and large decks use a rolling buffer instead of exhausting
memory. Rendering, notes and file work run outside the presentation controls so a
slow document operation does not have to freeze navigation.
| Your computer | Download | Run after extracting |
## What it does well
| Feature | What it means while presenting |
| --- | --- |
| **Real multi-screen control** | Assign Presenter or Slides to every connected monitor. Repeat either role across several screens. Display changes use a confirmation timer and revert if the new arrangement is wrong. |
| **Layouts for each Presenter screen** | Resize or hide the current slide, next slide, previous slide, notes, timers and progress bar. Save a layout for one project or as a default, with separate preferences for different screens. |
| **Fast, visible preparation** | The Presenter reports what it is preparing, RAM use and an ETA when available. Prepared nearby slides are served from RAM; a bounded rolling buffer reloads distant slides only when needed. |
| **Useful live tools** | Point, draw arrows and highlight without modifying the PDF or rerendering slide images. Tool size follows the visible slide, including high-resolution output. |
| **Shared zoom** | Opt in to zoom, pan or fit a page to width from Presenter or Slides. Both views stay on the same part of the page. |
| **Safe slide browsing** | Browse resizable thumbnails without changing the live slide. Double-click to preview, or enable **Change on click** when direct switching is useful. |
| **Notes that belong to the presentation** | Read notes from a sidecar or the PDF, import TXT/Markdown, and double-click the notes pane to edit the current slide. Notes automatically fit the available space. |
| **Presentation-aware desktop behavior** | Deckstride asks supported operating systems to keep the display awake and reports whether protection is active. Closing Presenter also closes its Slides windows. |
| **Portable by design** | The release binaries include the PDF renderer and application dependencies. Keep the extracted folder anywhere convenient; no Rust or separate PDF software is required. |
| **Themes and languages** | Choose from 20 built-in palettes and seven interface languages, or import bounded offline language/theme packs. |
On Windows, multi-screen output, per-screen layouts, zoom, tools, and unplugging then
reconnecting displays have been tested in extended use. Linux and macOS use the same
presentation model, but desktop and window-manager behavior still deserves testing
on the machines that will run the show.
## Download and run
Open the [release page](https://proxy.dandaedre.com/gitea/idle-org/deckstride/releases)
and download the archive for your computer.
| Platform | Recommended download | Start after extracting |
| --- | --- | --- |
| Windows x86_64 | `pdf-presenter-portable-x86_64-pc-windows-gnu-v….zip` | `pdf-presenter.exe` |
| Linux x86_64 | `pdf-presenter-portable-x86_64-unknown-linux-gnu-v….tgz` | `./pdf-presenter` |
| Windows x86_64 | `deckstride-portable-x86_64-pc-windows-gnu-v….zip` | `deckstride.exe` |
| Linux x86_64 | `deckstride-portable-x86_64-unknown-linux-gnu-v….tgz` | `./deckstride` |
| Linux ARM64 | `deckstride-portable-aarch64-unknown-linux-musl-v….tgz` | `./deckstride` |
| Apple Silicon macOS 13+ | `deckstride-portable-aarch64-apple-darwin-v….tgz` | Follow the release-page macOS instructions |
| Intel macOS 13+ | `deckstride-portable-x86_64-apple-darwin-v….tgz` | Follow the release-page macOS instructions |
Releases are currently **previews**. Windows binaries are unsigned; macOS downloads
are not yet available. Test your display setup before using it for a live event.
[Installation, updates and optional Linux app-menu integration →](docs/user-guide.md#install-and-update)
Windows and macOS builds are currently unsigned. Releases are ready for normal use;
test the actual computer, adapters and display arrangement before a live event.
macOS artifacts are cross-built on Linux and have not yet had native Mac runtime
testing. [Installation and update details →](docs/user-guide.md#install-and-update)
## Set up your presentation
If you already have [cargo-binstall](https://github.com/cargo-bins/cargo-binstall)
installed, install the prebuilt release directly:
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
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
or all projects.
4. **Present.** Use arrows or Space to advance. Type a slide number and press Enter
to jump. All slides opens a thumbnail browser; B blanks or restores the output.
Opening a document shows the presentation by default. Changing displays or fullscreen
preserves whether you have shown or blanked the output. Hide the bars for more space; move the
pointer near an edge or right-click to recover them.
Prepared slides are cached for reuse. The presenter shows loading progress, RAM use
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.
## Import your notes
Open your presentation, then choose **Menu → Import notes…**, or drop a `.txt` or
`.md` file onto the presenter window. Review the import and choose **Import and save
notes**. This creates or updates `presentation.notes.toml` beside `presentation.pdf`
(or `Slides.notes.toml` beside a picture folder named `Slides`). Your original notes
file and slides stay untouched. Double-click the notes pane to edit a slide later.
**TXT:** separate slides with a line containing two or more hyphens:
```text
Welcome everyone.
-------
Explain the results.
-------
Thank the audience.
```sh
cargo binstall deckstride --git https://proxy.dandaedre.com/gitea/idle-org/deckstride --version 0.1.96 --strategies crate-meta-data
```
**Markdown:** start each slide with a top-level `#` title. Titles are separators;
only their body becomes the slide's notes:
Replace `0.1.96` with another published Deckstride version when needed. Then run
`deckstride`.
```markdown
# Introduction
Welcome everyone.
# Results
Explain the results.
# Conclusion
Thank the audience.
```
## Set up a show
Sections map to slides **in order, starting at slide 1**; titles do not select slide
numbers. Fewer sections preserve the remaining slides' notes; too many sections
reject the import without writing. Empty sections clear a slide's notes. TXT files
need no final separator (a final separator creates an empty section). Use UTF-8.
Markdown `##` subheadings and headings inside fenced code stay in the note;
nonblank text before the first `#` title is rejected. Notes display as plain text.
[Format details and limits →](docs/interfaces/presentation-notes.md#importing-txt-and-markdown)
1. **Open a PDF or picture folder.** Use Menu, drag and drop, or open an associated
PDF on Windows. Pictures follow natural filename order.
2. **Choose where each view goes.** Open **Displays**, select Presenter, Slides or
Unused for each monitor, then apply the change. Keep the proposal or let it revert.
3. **Arrange your Presenter view.** Open **Layout** to size and position slides,
notes, clocks and progress. Save it for this presentation or for all projects.
4. **Present.** Use Left/Right, Page Up/Page Down or Space. Type a slide number and
press Enter to jump directly to it. Press B to blank or restore Slides.
[**Read the user guide →**](docs/user-guide.md)
Deckstride shows Slides by default after a document opens. Entering or leaving
fullscreen and changing screen assignments preserve that choice. Header and footer
controls can auto-hide; move the pointer near their edge or right-click to recover
them.
<table>
<tr>
<td width="50%"><img src="docs/images/display-routing.png" alt="Displays panel assigning Presenter and Slides across two monitors"></td>
<td width="50%"><img src="docs/images/all-slides.png" alt="All slides browser with three resizable slide thumbnails"></td>
</tr>
<tr>
<td align="center"><strong>Route and mirror screens</strong></td>
<td align="center"><strong>Browse without disturbing the live slide</strong></td>
</tr>
</table>
## Zoom and point while presenting
Enable page zoom from Menu when a document needs it. Scroll to zoom, drag to pan,
and double-click to fit the page width or reset. The crop is shared with Slides and
uses the already buffered image.
Open **Tools** for a pointer, arrows and a highlighter. Marks remain vector overlays
on the current slide and can be undone or cleared instantly. Their apparent size is
scaled between the smaller Presenter preview, 1080p output and 4K output.
<p align="center">
<img src="docs/images/presenter-tools.png" alt="Presenter view with the pointer toolbox open and a pointer visible on the current slide" width="100%">
</p>
## Slides, notes and shortcuts
PDFs work directly. A picture folder becomes a deck using natural filename order;
for example, `slide_2.png` comes before `slide_10.png`. Notes may come from embedded
PDF annotations, a `.notes.toml` sidecar, per-slide text files, or imported TXT and
Markdown. Source slides and imported note files are not overwritten.
Useful controls:
- **Right / Space** — next slide
- **Left / Shift+Space** — previous slide
- **Number, then Enter** — jump to a slide
- **Hold S for one second** — swap Presenter and Slides screens, then Keep or Revert
- **B** — blank or restore Slides
- **P / A / H** — pointer, arrow or highlighter
- **Escape / Ctrl+Q** — request quit confirmation (Escape first reverts an active display trial)
[Notes, layouts and controls →](docs/user-guide.md) ·
[Notes file formats →](docs/interfaces/presentation-notes.md) ·
[Preparation, cache and RAM behavior →](docs/user-guide.md#preparation-processed-slides-and-ram)
## Add languages and themes
Open **Preferences → General → Appearance** and choose **Import language pack…**
or **Import theme pack…**. Imported choices appear in the existing Language and
Theme selectors without restarting Deckstride. Packs stay offline and contain data
only.
Editable examples and ready-to-import ZIPs:
- [Language pack example](docs/packs/deckstride-language-pack.zip)
- [Theme pack example](docs/packs/deckstride-theme-pack.zip)
- [Pack format and limits](docs/packs/README.md)
## Open source
Deckstride is independent open-source software under the [MIT license](LICENSE).
Development includes LLM-generated or LLM-assisted work with human review. The
project is used in professional settings, while physical acceptance work remains
documented rather than hidden.
---

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
[package]
name = "pdf-presenter"
name = "deckstride"
version.workspace = true
edition.workspace = true
license.workspace = true
@ -26,7 +26,8 @@ image = { version = "=0.25.10", default-features = false, features = ["png", "jp
hayro = "=0.9.0"
chrono = "0.4"
rfd = "=0.15.4"
sysinfo = { version = "=0.39.6", default-features = false, features = ["system"] }
sysinfo = { version = "=0.37.2", default-features = false, features = ["system"] }
zip = { version = "2", default-features = false, features = ["deflate"] }
[target.'cfg(any(target_os = "linux", target_os = "windows", target_os = "macos"))'.dependencies]
keepawake = "=0.6.1"

View File

Before

Width:  |  Height:  |  Size: 364 KiB

After

Width:  |  Height:  |  Size: 364 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

View File

@ -0,0 +1,97 @@
Noto Sans: Copyright 2022 The Noto Project Authors (https://github.com/notofonts/latin-greek-cyrillic)
Noto Sans CJK: Copyright 2014-2021 Adobe (http://www.adobe.com/).
Noto Sans Devanagari: Copyright 2022 The Noto Project Authors (https://github.com/notofonts/devanagari)
Noto Sans Thai: Copyright 2022 The Noto Project Authors (https://github.com/notofonts/thai)
This Font Software is licensed under the SIL Open Font License,
Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font
creation efforts of academic and linguistic communities, and to
provide a free and open framework in which fonts may be shared and
improved in partnership with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply to
any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software
components as distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to,
deleting, or substituting -- in part or in whole -- any of the
components of the Original Version, by changing formats or by porting
the Font Software to a new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed,
modify, redistribute, and sell modified and unmodified copies of the
Font Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components, in
Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the
corresponding Copyright Holder. This restriction only applies to the
primary font name as presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created using
the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@ -0,0 +1,13 @@
# Embedded CJK font
`NotoSansCJK-Regular.ttc` is the unmodified Noto Sans CJK 2.004 collection used by
Canvas Pilot, under the included [SIL Open Font License 1.1](OFL.txt). Upstream:
<https://github.com/notofonts/noto-cjk/releases/tag/Sans2.004>.
SHA-256: `b76b0433203017ca80401b2ee0dd69350349871c4b19d504c34dbdd80541690a`.
Deckstride uses collection index 0 for Japanese and index 2 for Simplified
Chinese. The collection is embedded in the executable; no runtime font lookup or
download occurs. Font definitions are installed only when a CJK interface language
is active and only when the language selection changes. Other interface languages
retain egui's existing embedded fonts.

View File

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

View File

@ -16,8 +16,8 @@ pub(crate) fn window_attributes() -> WindowAttributes {
let attributes = {
use winit::platform::{wayland::WindowAttributesExtWayland, x11::WindowAttributesExtX11};
let attributes =
WindowAttributesExtWayland::with_name(attributes, "pdf-presenter", "pdf-presenter");
WindowAttributesExtX11::with_name(attributes, "pdf-presenter", "pdf-presenter")
WindowAttributesExtWayland::with_name(attributes, "deckstride", "deckstride");
WindowAttributesExtX11::with_name(attributes, "deckstride", "deckstride")
};
attributes
}

View File

@ -210,13 +210,13 @@ impl App {
if self.presenter.is_none() {
self.presenter = Some(NativeWindow::create(
event_loop,
"PDF Presenter - presenter controls",
"Deckstride - presenter controls",
)?);
}
if self.audience.is_none() {
self.audience = Some(NativeWindow::create(
event_loop,
"PDF Presenter - mock audience output",
"Deckstride - mock audience output",
)?);
}
self.place();

View File

@ -82,6 +82,8 @@ pub mod studio;
/// Presenter interface language.
pub mod localization;
/// Bounded runtime language and theme packs.
pub mod packs;
/// Standalone presenter palettes.
pub mod theme;

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@
windows_subsystem = "windows"
)]
use pdf_presenter::{native, poc::Options};
use deckstride::{native, poc::Options};
fn main() {
if std::env::args().nth(1).as_deref() == Some("--licenses") {
@ -11,7 +11,7 @@ fn main() {
return;
}
if std::env::args().nth(1).as_deref() == Some("--worker") {
if let Err(e) = pdf_presenter::worker::run() {
if let Err(e) = deckstride::worker::run() {
eprintln!("{e}");
std::process::exit(1);
}
@ -25,7 +25,7 @@ fn main() {
return;
}
if std::env::args().nth(1).as_deref() == Some("--keep-awake") {
let _ = pdf_presenter::output::keep_awake();
let _ = deckstride::output::keep_awake();
return;
}
let mut args = std::env::args().skip(1).collect::<Vec<_>>();
@ -53,14 +53,16 @@ fn main() {
};
if options.help {
println!(
"PDF Presenter {} — native PDF and picture-folder presenter\n\
Usage: pdf-presenter [--open PDF_OR_FOLDER] [--windowed]\n\
pdf-presenter --list-monitors\n\
pdf-presenter --presenter N --audience N\n\
pdf-presenter --smoke-test\n\
"Deckstride {} — native PDF and picture-folder presenter\n\
Usage: deckstride [--open PDF_OR_FOLDER] [--windowed]\n\
deckstride --list-monitors\n\
deckstride --presenter N --audience N\n\
deckstride --smoke-test\n\
Both roles start fullscreen. Select/mirror screens from Displays.\n\
Keys: arrows/space navigate, number + Enter jumps, B blanks, Escape cancels\n\
or safely leaves fullscreen. Right-click restores hidden header/footer.\n\
Keys: arrows/space navigate, number + Enter jumps, B blanks.\n\
Escape/Ctrl+Q request quit confirmation; Escape first reverts a display trial.\n\
Hold S for one second to swap Presenter/Slides groups.\n\
Fullscreen uses explicit controls; right-click restores hidden header/footer.\n\
All slides opens a windowed browser; click only selects unless enabled.\n\
PDF/image decoding runs in supervised workers; no external PDF backend needed.",
env!("CARGO_PKG_VERSION")
@ -68,12 +70,12 @@ PDF/image decoding runs in supervised workers; no external PDF backend needed.",
return;
}
let result = if proof {
pdf_presenter::desktop::run(options)
deckstride::desktop::run(options)
} else {
native::run(options, path)
};
if let Err(error) = result {
eprintln!("PDF Presenter could not start/continue: {error}");
eprintln!("Deckstride could not start/continue: {error}");
std::process::exit(1);
}
}

View File

@ -53,6 +53,102 @@ enum Role {
}
const OUTPUT_BASE_CACHE_MAX_PIXELS: usize = 4096 * 4096;
#[cfg(target_os = "windows")]
const PRESENTER_FOCUS_RETRY_DELAYS: [Duration; 5] = [
Duration::from_millis(80),
Duration::from_millis(150),
Duration::from_millis(250),
Duration::from_millis(400),
Duration::from_millis(650),
];
#[cfg(target_os = "windows")]
struct PresenterFocusRetry {
window: WindowId,
next: Instant,
attempt: usize,
}
#[cfg(target_os = "windows")]
impl PresenterFocusRetry {
fn new(window: WindowId, now: Instant) -> Self {
Self {
window,
next: now + PRESENTER_FOCUS_RETRY_DELAYS[0],
attempt: 0,
}
}
fn take_attempt(&mut self, now: Instant) -> bool {
if now < self.next {
return false;
}
self.attempt += 1;
if let Some(delay) = PRESENTER_FOCUS_RETRY_DELAYS.get(self.attempt) {
self.next = now + *delay;
}
true
}
fn finished(&self) -> bool {
self.attempt >= PRESENTER_FOCUS_RETRY_DELAYS.len()
}
}
#[cfg(target_os = "windows")]
fn activate_presenter(window: &Window) {
use std::ffi::c_void;
use winit::raw_window_handle::{HasWindowHandle, RawWindowHandle};
type Hwnd = *mut c_void;
#[link(name = "user32")]
unsafe extern "system" {
fn GetForegroundWindow() -> Hwnd;
fn GetWindowThreadProcessId(window: Hwnd, process: *mut u32) -> u32;
fn GetCurrentThreadId() -> u32;
fn AttachThreadInput(thread: u32, foreground: u32, attach: i32) -> i32;
fn BringWindowToTop(window: Hwnd) -> i32;
fn SetForegroundWindow(window: Hwnd) -> i32;
fn SetActiveWindow(window: Hwnd) -> Hwnd;
fn SetFocus(window: Hwnd) -> Hwnd;
}
window.set_minimized(false);
window.focus_window();
let Some(hwnd) = window
.window_handle()
.ok()
.and_then(|handle| match handle.as_raw() {
RawWindowHandle::Win32(handle) => Some(handle.hwnd.get() as Hwnd),
_ => None,
})
else {
return;
};
// SetForegroundWindow is timing-sensitive while fullscreen windows are mapping.
// Temporarily sharing the foreground input queue lets Windows apply activation
// to this already-visible Presenter. Calls are bounded to startup retries.
unsafe {
let foreground = GetForegroundWindow();
let current_thread = GetCurrentThreadId();
let foreground_thread = if foreground.is_null() {
0
} else {
GetWindowThreadProcessId(foreground, std::ptr::null_mut())
};
let attached = foreground_thread != 0
&& foreground_thread != current_thread
&& AttachThreadInput(current_thread, foreground_thread, 1) != 0;
BringWindowToTop(hwnd);
SetForegroundWindow(hwnd);
SetActiveWindow(hwnd);
SetFocus(hwnd);
if attached {
AttachThreadInput(current_thread, foreground_thread, 0);
}
}
}
#[derive(Clone, Debug, PartialEq)]
struct PresentationBaseKey {
size: [u32; 2],
@ -97,15 +193,19 @@ struct NativeWindow {
zoom_watch: crate::zoom::PerformanceWatch,
zoom_slow: bool,
presentation_base: Option<PresentationBase>,
applied_theme: Option<crate::theme::Theme>,
applied_theme_pack: Option<Option<String>>,
applied_language: Option<crate::localization::Language>,
applied_language_pack: Option<Option<String>>,
#[cfg(target_os = "linux")]
browser_parent: Option<WindowId>,
}
impl NativeWindow {
fn create(el: &ActiveEventLoop, role: Role, monitor: String) -> Result<Self, Failure> {
let title = match role {
Role::Presenter => "PDF Presenter — Presenter",
Role::Browser => "PDF Presenter — All slides",
Role::Presentation => "PDF Presenter — Presentation",
Role::Presenter => "Deckstride — Presenter",
Role::Browser => "Deckstride — All slides",
Role::Presentation => "Deckstride — Slides",
};
let attributes = crate::artwork::window_attributes()
.with_title(title)
@ -157,6 +257,10 @@ impl NativeWindow {
zoom_watch: Default::default(),
zoom_slow: false,
presentation_base: None,
applied_theme: None,
applied_theme_pack: None,
applied_language: None,
applied_language_pack: None,
#[cfg(target_os = "linux")]
browser_parent: None,
})
@ -240,8 +344,28 @@ impl NativeWindow {
return Err("Display exceeds 40 megapixels".into());
}
if let Some(s) = studio.as_ref() {
s.settings.theme.apply(&self.ctx);
crate::localization::apply(&self.ctx, &s.settings.language);
if self.applied_theme != Some(s.settings.theme)
|| self.applied_theme_pack.as_ref() != Some(&s.settings.theme_pack)
{
crate::theme::apply_selected(
&self.ctx,
s.settings.theme,
s.settings.theme_pack.as_deref(),
);
self.applied_theme = Some(s.settings.theme);
self.applied_theme_pack = Some(s.settings.theme_pack.clone());
}
if self.applied_language != Some(s.settings.language)
|| self.applied_language_pack.as_ref() != Some(&s.settings.language_pack)
{
crate::localization::apply_selected(
&self.ctx,
&s.settings.language,
s.settings.language_pack.as_deref(),
);
self.applied_language = Some(s.settings.language);
self.applied_language_pack = Some(s.settings.language_pack.clone());
}
}
let input = self.input.take_egui_input(&self.window);
let role = self.role;
@ -307,10 +431,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();
}
@ -428,7 +549,15 @@ impl NativeWindow {
screen_rect: Some(screen),
..Default::default()
},
|ui| crate::tools::paint(ui.painter(), target, uv, &setup.overlay),
|ui| {
crate::tools::paint_scaled(
ui.painter(),
target,
uv,
&setup.overlay,
crate::tools::slide_paint_scale(target),
)
},
);
let overlay_primitives = self
.overlay_ctx
@ -615,6 +744,9 @@ struct App {
override_presenter: Option<usize>,
override_output: Option<usize>,
navigation_hold: Option<(WindowId, Key, crate::navigation::Hold)>,
swap_hold: Option<(WindowId, Instant)>,
#[cfg(target_os = "windows")]
presenter_focus: Option<PresenterFocusRetry>,
}
impl App {
fn redraw(&self) {
@ -622,8 +754,42 @@ impl App {
native.window.request_redraw();
}
}
#[cfg(target_os = "windows")]
fn retry_presenter_focus(&mut self, now: Instant) {
let Some(retry) = &mut self.presenter_focus else {
return;
};
if self
.windows
.iter()
.any(|window| window.role == Role::Browser && window.window.has_focus())
{
self.presenter_focus = None;
return;
}
if !retry.take_attempt(now) {
return;
}
if !self
.windows
.iter()
.any(|window| window.role == Role::Presenter && window.window.has_focus())
&& let Some(window) = self
.windows
.iter()
.find(|window| window.window.id() == retry.window)
{
activate_presenter(&window.window);
}
if retry.finished() {
self.presenter_focus = None;
}
}
fn refresh(&mut self, el: &ActiveEventLoop) {
let (handles, primary) = monitors(el);
if let Some(s) = &mut self.studio {
s.observe_startup_displays(handles.len(), handles.first().map(|(m, _)| m.id.as_str()));
}
let changed = self
.handles
.iter()
@ -643,13 +809,13 @@ 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;
}
if let Some(s) = &mut self.studio {
if changed {
self.swap_hold = None;
s.set_monitors(
self.handles.iter().map(|(m, _)| m.clone()).collect(),
primary,
@ -682,9 +848,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;
}
@ -713,7 +878,18 @@ impl App {
let mut desired = vec![];
if let Some(s) = &self.studio {
for id in &s.routes.presenter {
desired.push((Role::Presenter, id.clone(), s.presenter_fullscreen()));
desired.push((
Role::Presenter,
id.clone(),
s.screen_fullscreen(
id,
if s.is_single_screen(id) {
s.presentation_fullscreen()
} else {
s.presenter_fullscreen()
},
),
));
}
if s.browser_open {
let id = s
@ -731,7 +907,7 @@ impl App {
if let Some(h) = &self.host {
for id in &h.state.monitors {
if self.handles.iter().any(|(m, _)| &m.id == id) {
desired.push((Role::Presentation, id.clone(), h.state.fullscreen));
desired.push((Role::Presentation, id.clone(), h.state.fullscreen_on(id)));
}
}
}
@ -751,13 +927,26 @@ impl App {
{
index
} else {
#[cfg(target_os = "windows")]
let first_presenter = role == Role::Presenter
&& !self
.windows
.iter()
.any(|window| window.role == Role::Presenter);
self.windows
.push(NativeWindow::create(el, role, id.clone())?);
#[cfg(target_os = "windows")]
if first_presenter {
self.presenter_focus = Some(PresenterFocusRetry::new(
self.windows.last().unwrap().window.id(),
Instant::now(),
));
}
self.windows.len() - 1
};
#[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()
@ -786,8 +975,14 @@ impl App {
Ok(())
}
fn key(&mut self, role: Role, key: Key, consumed: bool, modifiers: egui::Modifiers) {
let escape = matches!(key, Key::Named(NamedKey::Escape)) && modifiers.is_none();
let quit = escape
|| (matches!(&key, Key::Character(c) if c.eq_ignore_ascii_case("q"))
&& modifiers.ctrl
&& !modifiers.alt
&& !modifiers.shift);
if role == Role::Presentation {
if matches!(key, Key::Named(NamedKey::Escape))
if escape
&& let Some(host) = &self.host
&& host.state.route_trial.is_some()
{
@ -798,7 +993,16 @@ impl App {
});
return;
}
if matches!(key, Key::Named(NamedKey::Escape)) {
if quit {
if let Some(h) = &self.host
&& h.parent_connected
{
let _ = h.acks.try_send(Ack {
request_quit: true,
..Default::default()
});
return;
}
// Focus may move here as All slides closes. Escape must never blank
// a connected show; an orphan can still be dismissed safely.
if let Some(h) = &mut self.host {
@ -809,7 +1013,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()
});
}
@ -820,10 +1024,25 @@ impl App {
let Some(s) = &mut self.studio else {
return;
};
if matches!(key, Key::Named(NamedKey::Escape)) && s.route_trial.is_some() {
if s.quit_confirmation {
if escape {
s.execute(Action::CancelExit);
}
self.redraw();
return;
}
if escape && s.route_trial.is_some() {
s.execute(Action::RevertRoutes);
return;
}
if quit {
s.execute(Action::Exit);
self.redraw();
return;
}
if s.startup_single_offer() {
return;
}
// Notes editing must never turn typing or Escape into presentation commands.
// Unsaved text is only discarded through the explicit editor control.
if s.notes_editor.is_some() || s.notes_import.is_some() {
@ -843,14 +1062,6 @@ impl App {
self.redraw();
return;
}
if role == Role::Browser && matches!(key, Key::Named(NamedKey::Escape)) {
if !s.jump.is_empty() {
s.jump.clear();
} else if s.browser_preview.take().is_none() {
s.execute(Action::CloseBrowser);
}
return;
}
if consumed {
return;
}
@ -873,16 +1084,6 @@ impl App {
Key::Named(NamedKey::Backspace) if !s.jump.is_empty() => {
s.jump.pop();
}
Key::Named(NamedKey::Escape) => {
if !s.jump.is_empty() {
s.jump.clear();
} else if s.layout_open || s.displays_open || s.menu_open || s.toolbox.open {
s.layout_open = false;
s.displays_open = false;
s.menu_open = false;
s.toolbox.open = false;
}
}
Key::Character(c) if c.eq_ignore_ascii_case("p") => {
let tool = if s.toolbox.tool == crate::tools::Tool::Pointer {
crate::tools::Tool::Off
@ -917,6 +1118,18 @@ impl App {
s.execute(Action::FinishNavigation);
}
}
fn poll_swap(&mut self, now: Instant) {
let Some((owner, _)) = self.swap_hold else {
return;
};
let allowed = self.windows.iter().any(|w| {
w.window.id() == owner && w.window.has_focus() && !w.ctx.egui_wants_keyboard_input()
}) && self.studio.as_ref().is_some_and(swap_allowed);
if take_due_swap(&mut self.swap_hold, now, allowed) {
self.studio.as_mut().unwrap().execute(Action::SwapRoutes);
self.redraw();
}
}
fn repeat_navigation(&mut self, now: Instant) {
let Some((id, _, _)) = &self.navigation_hold else {
return;
@ -926,7 +1139,9 @@ impl App {
.iter()
.any(|w| w.window.id() == *id && w.window.has_focus())
&& self.studio.as_ref().is_some_and(|s| {
s.notes_editor.is_none()
!s.quit_confirmation
&& !s.startup_single_offer()
&& s.notes_editor.is_none()
&& s.notes_import.is_none()
&& !s.dialog_busy
&& !s.loading
@ -954,7 +1169,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(),
@ -963,6 +1178,7 @@ impl App {
s.status.clone(),
s.layout_open,
s.browser_open,
s.quit_confirmation,
s.route_trial.as_ref().map(|trial| trial.id),
);
let chooser_was_open = s.dialog_busy;
@ -973,7 +1189,11 @@ impl App {
#[cfg(target_os = "windows")]
if matches!(
action,
Action::Pick(_) | Action::PickNotes | Action::PickBlankPicture
Action::Pick(_)
| Action::PickNotes
| Action::PickBlankPicture
| Action::PickLanguagePack
| Action::PickThemePack
) && !s.dialog_busy
{
use winit::raw_window_handle::{HasWindowHandle, RawWindowHandle};
@ -1043,6 +1263,9 @@ impl App {
}
continue;
}
if ack.request_quit {
s.execute(Action::Exit);
}
if let Some(action) = ack.display_action {
s.display_control(action, ack.route_trial);
}
@ -1094,6 +1317,17 @@ impl App {
},
monitors: s.routes.presentation.clone(),
fullscreen: s.presentation_fullscreen(),
screen_fullscreen: s
.routes
.presentation
.iter()
.map(|id| {
(
id.clone(),
s.screen_fullscreen(id, s.presentation_fullscreen()),
)
})
.collect(),
blanked: s.blanked,
blank_picture: s.blank_picture.as_ref().map(|f| f.info.clone()),
..Default::default()
@ -1137,6 +1371,7 @@ impl App {
s.status.clone(),
s.layout_open,
s.browser_open,
s.quit_confirmation,
s.route_trial.as_ref().map(|trial| trial.id),
);
}
@ -1277,7 +1512,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()
});
}
@ -1378,7 +1614,9 @@ impl ApplicationHandler for App {
// egui's focused button activation or the OS repeat stream.
let navigation_event = role != Role::Presentation
&& self.studio.as_ref().is_some_and(|s| {
s.notes_editor.is_none()
!s.quit_confirmation
&& !s.startup_single_offer()
&& s.notes_editor.is_none()
&& s.notes_import.is_none()
&& !s.dialog_busy
&& s.route_trial.is_none()
@ -1416,7 +1654,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();
@ -1434,16 +1672,24 @@ impl ApplicationHandler for App {
}
}
WindowEvent::Focused(false) => {
self.swap_hold = None;
self.stop_navigation();
self.windows[index].ui.navigation_hold = None;
}
WindowEvent::ModifiersChanged(_) => self.stop_navigation(),
WindowEvent::ModifiersChanged(_) => {
self.swap_hold = None;
self.stop_navigation();
}
WindowEvent::KeyboardInput {
event,
is_synthetic,
..
} => {
if event.state == ElementState::Released {
if matches!(&event.logical_key, Key::Character(c) if c.eq_ignore_ascii_case("s"))
{
self.swap_hold = None;
}
if self
.navigation_hold
.as_ref()
@ -1452,14 +1698,25 @@ impl ApplicationHandler for App {
self.stop_navigation();
}
} else if !event.repeat && !is_synthetic {
self.swap_hold = None;
self.stop_navigation();
let native = &self.windows[index];
let modifiers = native.input.egui_input().modifiers;
let consumed = native.ctx.egui_wants_keyboard_input();
if role != Role::Presentation
&& !consumed
&& modifiers.is_none()
&& matches!(&event.logical_key, Key::Character(c) if c.eq_ignore_ascii_case("s"))
&& self.studio.as_ref().is_some_and(swap_allowed)
{
self.swap_hold = Some((id, Instant::now()));
}
let direction = navigation_direction(&event.logical_key, modifiers);
let allowed = role != Role::Presentation
&& self.studio.as_ref().is_some_and(|s| {
s.notes_editor.is_none()
!s.quit_confirmation
&& !s.startup_single_offer()
&& s.notes_editor.is_none()
&& s.notes_import.is_none()
&& !s.dialog_busy
&& s.route_trial.is_none()
@ -1471,34 +1728,7 @@ impl ApplicationHandler for App {
crate::navigation::Hold::new(direction, Instant::now()),
));
}
let local_dismissed = matches!(event.logical_key, Key::Named(NamedKey::Escape))
&& !modifiers.ctrl
&& !modifiers.alt
&& !modifiers.command
&& role == Role::Presenter
&& self.studio.as_mut().is_some_and(|s| {
if s.route_trial.is_some()
|| s.notes_editor.is_some()
|| s.notes_import.is_some()
|| !s.jump.is_empty()
{
return false;
}
let Some(view) =
s.presenter_views.get_mut(&self.windows[index].monitor)
else {
return false;
};
let open = view.layout_open || view.menu_open;
view.layout_open = false;
view.menu_open = false;
open
});
if local_dismissed {
self.redraw();
} else {
self.key(role, event.logical_key, consumed, modifiers);
}
self.key(role, event.logical_key, consumed, modifiers);
}
}
WindowEvent::Resized(_) | WindowEvent::ScaleFactorChanged { .. } => {
@ -1567,6 +1797,7 @@ impl ApplicationHandler for App {
self.next_monitors = now + Duration::from_millis(750);
}
if now >= self.next_poll {
self.poll_swap(now);
self.repeat_navigation(now);
// egui repaint timers alone do not wake this custom native host.
// Redraw held mouse controls at their repeat deadline, not at frame rate.
@ -1594,7 +1825,7 @@ impl ApplicationHandler for App {
crate::output::OutputViewport {
monitor: id.clone(),
size: [size.width, size.height],
fullscreen: host.state.fullscreen,
fullscreen: host.state.fullscreen_on(id),
}
})
});
@ -1617,6 +1848,8 @@ impl ApplicationHandler for App {
window.repaint_if_due(now);
window.transition(&self.handles, now);
}
#[cfg(target_os = "windows")]
self.retry_presenter_focus(now);
if self.smoke
&& self.started.elapsed() > Duration::from_millis((self.smoke_stage as u64 + 1) * 300)
&& let Some(s) = &mut self.studio
@ -1648,7 +1881,7 @@ impl ApplicationHandler for App {
for view in s.presenter_views.values_mut() {
view.layout = Default::default();
}
// Escape dismisses transient UI; fullscreen is an explicit control.
// Fullscreen remains an explicit control; Escape requests quit confirmation.
}
6 => {
if self.windows.iter().all(|w| w.frames > 0) && !self.windows.is_empty() {
@ -1695,6 +1928,9 @@ pub fn run(options: crate::poc::Options, path: Option<std::path::PathBuf>) -> Re
override_presenter: options.presenter,
override_output: options.audience,
navigation_hold: None,
swap_hold: None,
#[cfg(target_os = "windows")]
presenter_focus: None,
};
let result = el.run_app(&mut app);
if let Some(output) = &mut app.output {
@ -1763,6 +1999,9 @@ pub fn run_output() -> Result<(), Failure> {
override_presenter: None,
override_output: None,
navigation_hold: None,
swap_hold: None,
#[cfg(target_os = "windows")]
presenter_focus: None,
};
el.run_app(&mut app)?;
Ok(())
@ -1809,7 +2048,7 @@ mod buffer_tests {
#[cfg(target_os = "linux")]
#[test]
fn three_native_windows_render_without_clicks_and_reset_placement_on_topology_change() {
if std::env::var_os("PDF_PRESENTER_GUI_TESTS").is_none() {
if std::env::var_os("DECKSTRIDE_GUI_TESTS").is_none() {
return;
}
use winit::platform::x11::EventLoopBuilderExtX11;
@ -1887,6 +2126,9 @@ mod buffer_tests {
override_presenter: None,
override_output: None,
navigation_hold: None,
swap_hold: None,
#[cfg(target_os = "windows")]
presenter_focus: None,
},
};
EventLoop::builder()
@ -1942,6 +2184,9 @@ mod buffer_tests {
override_presenter: None,
override_output: None,
navigation_hold: None,
swap_hold: None,
#[cfg(target_os = "windows")]
presenter_focus: None,
};
for (role, consumed, modifiers, expected) in [
(Role::Presenter, false, egui::Modifiers::NONE, 1),
@ -1974,43 +2219,29 @@ mod buffer_tests {
s.settings.presenter_fullscreen = true;
s.settings.presentation_fullscreen = true;
s.blanked = false;
s.jump = "12".into();
app.key(
Role::Presenter,
Key::Named(NamedKey::Escape),
false,
egui::Modifiers::NONE,
);
assert!(app.studio.as_ref().unwrap().jump.is_empty());
app.key(
Role::Presenter,
Key::Named(NamedKey::Escape),
false,
egui::Modifiers::NONE,
);
let s = app.studio.as_ref().unwrap();
assert!(s.presenter_fullscreen() && s.presentation_fullscreen());
assert!(!s.blanked);
for consumed in [false, true] {
let s = app.studio.as_mut().unwrap();
s.browser_open = true;
s.browser_preview = Some((s.generation, 1));
app.key(
Role::Browser,
Key::Named(NamedKey::Escape),
consumed,
egui::Modifiers::NONE,
);
let s = app.studio.as_ref().unwrap();
assert!(s.browser_open && s.browser_preview.is_none() && !s.blanked);
app.key(
Role::Browser,
Key::Named(NamedKey::Escape),
consumed,
egui::Modifiers::NONE,
);
let s = app.studio.as_ref().unwrap();
assert!(!s.browser_open && !s.blanked && s.presentation_fullscreen());
for (key, modifiers) in [
(Key::Named(NamedKey::Escape), egui::Modifiers::NONE),
(Key::Character("q".into()), egui::Modifiers::CTRL),
] {
for role in [Role::Presenter, Role::Browser] {
app.key(role, key.clone(), true, modifiers);
let s = app.studio.as_ref().unwrap();
assert!(s.quit_confirmation && !s.close_requested && !s.blanked);
app.key(
role,
Key::Named(NamedKey::Space),
false,
egui::Modifiers::NONE,
);
assert!(app.studio.as_ref().unwrap().quit_confirmation);
app.key(
role,
Key::Named(NamedKey::Escape),
true,
egui::Modifiers::NONE,
);
assert!(!app.studio.as_ref().unwrap().quit_confirmation);
}
}
let (_tx, commands) = mpsc::sync_channel(4);
let (acks, rx) = mpsc::sync_channel(8);
@ -2043,10 +2274,8 @@ mod buffer_tests {
);
assert!(!app.host.as_ref().unwrap().state.blanked);
assert!(!app.host.as_ref().unwrap().close_requested);
assert!(
rx.try_recv().is_err(),
"Focus transfer must not request audience blanking"
);
let ack = rx.try_recv().unwrap();
assert!(ack.request_quit && !ack.request_blank);
app.key(
Role::Presentation,
Key::Character("b".into()),
@ -2116,3 +2345,61 @@ mod buffer_tests {
));
}
}
fn swap_allowed(s: &Studio) -> bool {
s.initialized
&& !s.quit_confirmation
&& !s.startup_single_offer()
&& s.notes_editor.is_none()
&& s.notes_import.is_none()
&& !s.dialog_busy
&& !s.loading
&& s.route_trial.is_none()
&& !s.routes.presenter.is_empty()
&& !s.routes.presentation.is_empty()
}
fn take_due_swap(hold: &mut Option<(WindowId, Instant)>, now: Instant, allowed: bool) -> bool {
if !allowed {
*hold = None;
return false;
}
if hold.is_some_and(|(_, start)| now.saturating_duration_since(start) >= Duration::from_secs(1))
{
*hold = None;
return true;
}
false
}
#[cfg(test)]
mod swap_tests {
use super::*;
#[test]
fn hold_requires_one_second_fires_once_and_cancels_when_disallowed() {
let now = Instant::now();
let mut hold = Some((WindowId::dummy(), now));
assert!(!take_due_swap(
&mut hold,
now + Duration::from_millis(999),
true
));
assert!(take_due_swap(&mut hold, now + Duration::from_secs(1), true));
assert!(!take_due_swap(
&mut hold,
now + Duration::from_secs(20),
true
));
hold = Some((WindowId::dummy(), now));
assert!(!take_due_swap(
&mut hold,
now + Duration::from_millis(500),
false
));
assert!(!take_due_swap(
&mut hold,
now + Duration::from_secs(2),
true
));
}
}

View File

@ -47,12 +47,22 @@ pub struct HostState {
pub buffer_mib: u32,
pub monitors: Vec<String>,
pub fullscreen: bool,
#[serde(default)]
pub screen_fullscreen: std::collections::BTreeMap<String, bool>,
pub blanked: bool,
#[serde(default)]
pub blank_picture: Option<FrameInfo>,
pub quit: bool,
}
/// Actual size of the reference presentation window, never presenter content.
impl HostState {
pub fn fullscreen_on(&self, monitor: &str) -> bool {
self.screen_fullscreen
.get(monitor)
.copied()
.unwrap_or(self.fullscreen)
}
}
/// Actual size of the reference Slides window, never Presenter content.
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct OutputViewport {
pub monitor: String,
@ -71,6 +81,8 @@ pub struct Ack {
#[serde(default)]
pub request_blank: bool,
#[serde(default)]
pub request_quit: bool,
#[serde(default)]
pub display_action: Option<DisplayAction>,
#[serde(default)]
pub route_trial: Option<u64>,
@ -199,7 +211,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()
});
@ -294,8 +306,8 @@ pub fn keep_awake() -> Result<(), String> {
let guard = keepawake::Builder::default()
.display(true)
.idle(true)
.reason("PDF Presenter presentation")
.app_name("PDF Presenter")
.reason("Deckstride presentation")
.app_name("Deckstride")
.app_reverse_domain("com.beffroi.pdfpresenter")
.create();
#[cfg(not(any(target_os = "linux", target_os = "windows", target_os = "macos")))]

View File

@ -0,0 +1,698 @@
//! Bounded, data-only language and theme packs compatible with Canvas Pilot manifests.
use crate::theme::Palette;
use egui::Color32;
use serde::Deserialize;
use sha2::{Digest, Sha256};
use std::{
collections::{BTreeMap, BTreeSet},
io::Read,
path::{Path, PathBuf},
sync::{LazyLock, RwLock},
};
const MAX_ARCHIVE: u64 = 2 * 1024 * 1024;
const MAX_EXPANDED: u64 = 4 * 1024 * 1024;
const MAX_PACKS: usize = 32;
#[derive(Clone, Debug, Deserialize)]
#[serde(deny_unknown_fields)]
struct LanguageManifest {
version: u32,
id: String,
revision: u64,
languages: Vec<LanguageDescription>,
}
#[derive(Clone, Debug, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct LanguageDescription {
pub locale: String,
pub name: String,
pub native_name: String,
}
#[derive(Clone, Debug)]
pub struct InstalledLanguagePack {
pub id: String,
pub revision: u64,
pub languages: Vec<LanguageDescription>,
}
#[derive(Clone)]
struct LanguagePack {
manifest: LanguageManifest,
catalogs: BTreeMap<String, BTreeMap<String, &'static str>>,
path: PathBuf,
fingerprint: [u8; 32],
}
#[derive(Clone, Debug, Deserialize)]
#[serde(deny_unknown_fields)]
struct ThemeManifest {
version: u32,
id: String,
revision: u64,
themes: Vec<ThemeDescription>,
#[serde(default)]
notices: String,
}
#[derive(Clone, Debug, Deserialize)]
#[serde(deny_unknown_fields)]
pub struct ThemeDescription {
pub id: String,
pub name: String,
pub light: bool,
colors: ThemeColors,
}
#[derive(Clone, Debug, Deserialize)]
#[serde(deny_unknown_fields)]
struct ThemeColors {
canvas: String,
banner: String,
grid: String,
layer: String,
bg: String,
panel: String,
field: String,
line: String,
text: String,
muted: String,
cyan: String,
amber: String,
purple: String,
pattern: [String; 2],
}
#[derive(Clone, Debug)]
pub struct InstalledThemePack {
pub id: String,
pub revision: u64,
pub themes: Vec<ThemeDescription>,
pub notices: String,
}
#[derive(Clone)]
struct ThemePack {
manifest: ThemeManifest,
path: PathBuf,
fingerprint: [u8; 32],
}
static LANGUAGE_PACKS: LazyLock<RwLock<Vec<LanguagePack>>> =
LazyLock::new(|| RwLock::new(Vec::new()));
static THEME_PACKS: LazyLock<RwLock<Vec<ThemePack>>> = LazyLock::new(|| RwLock::new(Vec::new()));
#[derive(Default)]
struct InternPool {
values: BTreeMap<String, &'static str>,
bytes: usize,
}
static INTERNED: LazyLock<RwLock<InternPool>> = LazyLock::new(Default::default);
pub fn valid_id(id: &str) -> bool {
!id.is_empty()
&& id.len() <= 63
&& id
.bytes()
.all(|byte| byte.is_ascii_lowercase() || byte.is_ascii_digit() || byte == b'-')
&& !id.starts_with('-')
&& !id.ends_with('-')
}
pub fn valid_theme_choice(id: &str) -> bool {
id.split_once('/')
.is_some_and(|(pack, theme)| valid_id(pack) && valid_id(theme))
}
fn bounded_read(path: &Path) -> Result<Vec<u8>, String> {
let mut bytes = Vec::new();
std::fs::File::open(path)
.map_err(|error| error.to_string())?
.take(MAX_ARCHIVE + 1)
.read_to_end(&mut bytes)
.map_err(|error| error.to_string())?;
if bytes.len() as u64 > MAX_ARCHIVE {
return Err("Pack exceeds 2 MiB".into());
}
Ok(bytes)
}
fn fingerprint(bytes: &[u8]) -> [u8; 32] {
Sha256::digest(bytes).into()
}
fn intern(text: String) -> Result<&'static str, String> {
let mut pool = INTERNED.write().unwrap();
if let Some(value) = pool.values.get(&text) {
return Ok(value);
}
if pool.bytes.saturating_add(text.len()) > 32 * 1024 * 1024 {
return Err(
"Runtime language-pack text limit reached; restart before importing more".into(),
);
}
let leaked = Box::leak(text.clone().into_boxed_str());
pool.bytes += text.len();
pool.values.insert(text, leaked);
Ok(leaked)
}
fn parse_language(bytes: &[u8], path: PathBuf) -> Result<LanguagePack, String> {
if bytes.len() as u64 > MAX_ARCHIVE {
return Err("Language pack exceeds 2 MiB".into());
}
let mut zip = zip::ZipArchive::new(std::io::Cursor::new(bytes)).map_err(|e| e.to_string())?;
if zip.is_empty() || zip.len() > 17 {
return Err("Expected manifest.json and at most 16 catalogs".into());
}
let mut entries = BTreeMap::new();
let mut expanded = 0_u64;
for index in 0..zip.len() {
let mut entry = zip.by_index(index).map_err(|e| e.to_string())?;
let name = entry.name().to_owned();
if name.contains(['/', '\\'])
|| !name.ends_with(".json")
|| entry.is_dir()
|| entry
.unix_mode()
.is_some_and(|mode| mode & 0o170000 == 0o120000)
{
return Err("Pack entries must be regular JSON files at the ZIP root".into());
}
let mut data = Vec::new();
(&mut entry)
.take(MAX_EXPANDED.saturating_sub(expanded) + 1)
.read_to_end(&mut data)
.map_err(|e| e.to_string())?;
expanded += data.len() as u64;
if expanded > MAX_EXPANDED {
return Err("Expanded language pack exceeds 4 MiB".into());
}
if entries.insert(name, data).is_some() {
return Err("Duplicate ZIP entry".into());
}
}
let manifest: LanguageManifest = serde_json::from_slice(
&entries
.remove("manifest.json")
.ok_or("Missing manifest.json")?,
)
.map_err(|e| e.to_string())?;
if manifest.version != 2
|| manifest.revision == 0
|| !valid_id(&manifest.id)
|| manifest.languages.is_empty()
|| manifest.languages.len() > 16
{
return Err("Invalid language-pack manifest or unsupported version".into());
}
let builtins = ["system", "en", "fr", "es", "ja", "zh-cn", "de", "pt-br"];
let mut locales = BTreeSet::new();
let mut catalogs = BTreeMap::new();
for language in &manifest.languages {
if !valid_id(&language.locale)
|| builtins.contains(&language.locale.as_str())
|| !locales.insert(language.locale.clone())
{
return Err("Invalid, duplicate, or built-in locale identifier".into());
}
for name in [&language.name, &language.native_name] {
if name.trim().is_empty() || name.len() > 160 || name.chars().any(char::is_control) {
return Err("Invalid language display name".into());
}
}
let messages: BTreeMap<String, String> = serde_json::from_slice(
&entries
.remove(&format!("{}.json", language.locale))
.ok_or("Missing language catalog")?,
)
.map_err(|e| e.to_string())?;
if messages.is_empty() || messages.len() > 4096 {
return Err("Language catalog is empty or too large".into());
}
let mut checked = BTreeMap::new();
for (key, value) in messages {
if key.trim().is_empty()
|| key.len() > 16_384
|| key.chars().any(char::is_control)
|| value.trim().is_empty()
|| value.len() > 16_384
|| value
.chars()
.any(|c| c.is_control() && c != '\n' && c != '\t')
{
return Err("Invalid translation key or text".into());
}
checked.insert(key, intern(value)?);
}
catalogs.insert(language.locale.clone(), checked);
}
if !entries.is_empty() {
return Err("Unexpected files in language pack".into());
}
Ok(LanguagePack {
manifest,
catalogs,
path,
fingerprint: fingerprint(bytes),
})
}
fn color(text: &str) -> Result<Color32, String> {
if text.len() != 7
|| !text.starts_with('#')
|| !text[1..].bytes().all(|byte| byte.is_ascii_hexdigit())
{
return Err(format!("Expected opaque #RRGGBB color: {text}"));
}
let value = u32::from_str_radix(&text[1..], 16).map_err(|e| e.to_string())?;
Ok(Color32::from_rgb(
(value >> 16) as u8,
(value >> 8) as u8,
value as u8,
))
}
impl ThemeColors {
fn palette(&self) -> Result<Palette, String> {
Ok(Palette {
canvas: color(&self.canvas)?,
banner: color(&self.banner)?,
grid: color(&self.grid)?,
layer: color(&self.layer)?,
bg: color(&self.bg)?,
panel: color(&self.panel)?,
field: color(&self.field)?,
line: color(&self.line)?,
text: color(&self.text)?,
muted: color(&self.muted)?,
cyan: color(&self.cyan)?,
amber: color(&self.amber)?,
purple: color(&self.purple)?,
pattern: [color(&self.pattern[0])?, color(&self.pattern[1])?],
})
}
}
fn parse_theme(bytes: &[u8], path: PathBuf) -> Result<ThemePack, String> {
if bytes.len() as u64 > MAX_ARCHIVE {
return Err("Theme pack exceeds 2 MiB".into());
}
let mut zip = zip::ZipArchive::new(std::io::Cursor::new(bytes)).map_err(|e| e.to_string())?;
if zip.len() != 1 {
return Err("Expected only manifest.json in the theme pack".into());
}
let mut entry = zip.by_index(0).map_err(|e| e.to_string())?;
if entry.name() != "manifest.json"
|| entry.is_dir()
|| entry
.unix_mode()
.is_some_and(|mode| mode & 0o170000 == 0o120000)
{
return Err("Expected a regular manifest.json at the ZIP root".into());
}
let mut data = Vec::new();
(&mut entry)
.take(MAX_EXPANDED + 1)
.read_to_end(&mut data)
.map_err(|e| e.to_string())?;
if data.len() as u64 > MAX_EXPANDED {
return Err("Expanded theme pack exceeds 4 MiB".into());
}
let manifest: ThemeManifest = serde_json::from_slice(&data).map_err(|e| e.to_string())?;
if manifest.version != 1
|| manifest.revision == 0
|| !valid_id(&manifest.id)
|| manifest.themes.is_empty()
|| manifest.themes.len() > 16
|| manifest.notices.len() > 65_536
|| manifest
.notices
.chars()
.any(|c| c.is_control() && !matches!(c, '\n' | '\r' | '\t'))
{
return Err("Invalid theme-pack manifest or unsupported version".into());
}
let mut ids = BTreeSet::new();
for theme in &manifest.themes {
if !valid_id(&theme.id)
|| !ids.insert(theme.id.clone())
|| theme.name.trim().is_empty()
|| theme.name.len() > 160
|| theme.name.chars().any(char::is_control)
{
return Err("Invalid or duplicate theme identifier/name".into());
}
theme.colors.palette()?;
}
Ok(ThemePack {
manifest,
path,
fingerprint: fingerprint(bytes),
})
}
fn zip_paths(directory: &Path) -> Result<Vec<PathBuf>, String> {
let entries = match std::fs::read_dir(directory) {
Ok(entries) => entries,
Err(error) if error.kind() == std::io::ErrorKind::NotFound => return Ok(Vec::new()),
Err(error) => return Err(error.to_string()),
};
let mut paths: Vec<_> = entries
.filter_map(Result::ok)
.map(|entry| entry.path())
.filter(|path| path.extension().is_some_and(|extension| extension == "zip"))
.collect();
paths.sort();
if paths.len() > MAX_PACKS {
return Err("Too many packs (maximum 32)".into());
}
Ok(paths)
}
pub fn load(root: &Path) -> Vec<String> {
let mut errors = Vec::new();
let mut languages = Vec::new();
match zip_paths(&root.join("language-packs")) {
Ok(paths) => {
for path in paths {
match bounded_read(&path).and_then(|bytes| parse_language(&bytes, path.clone())) {
Ok(pack)
if !languages.iter().any(|old: &LanguagePack| {
old.manifest.id == pack.manifest.id
|| old.manifest.languages.iter().any(|old_language| {
pack.manifest
.languages
.iter()
.any(|new| new.locale == old_language.locale)
})
}) =>
{
languages.push(pack)
}
Ok(_) => errors.push(format!("{}: duplicate pack or locale", path.display())),
Err(error) => errors.push(format!("{}: {error}", path.display())),
}
}
}
Err(error) => errors.push(error),
}
let mut themes = Vec::new();
match zip_paths(&root.join("theme-packs")) {
Ok(paths) => {
for path in paths {
match bounded_read(&path).and_then(|bytes| parse_theme(&bytes, path.clone())) {
Ok(pack)
if !themes
.iter()
.any(|old: &ThemePack| old.manifest.id == pack.manifest.id) =>
{
themes.push(pack)
}
Ok(_) => errors.push(format!("{}: duplicate pack identifier", path.display())),
Err(error) => errors.push(format!("{}: {error}", path.display())),
}
}
}
Err(error) => errors.push(error),
}
*LANGUAGE_PACKS.write().unwrap() = languages;
*THEME_PACKS.write().unwrap() = themes;
errors
}
fn install_bytes(
directory: &Path,
id: &str,
revision: u64,
previous: Option<(PathBuf, u64, [u8; 32])>,
bytes: &[u8],
) -> Result<PathBuf, String> {
let destination = previous
.as_ref()
.map(|(path, _, _)| path.clone())
.unwrap_or_else(|| directory.join(format!("{id}.zip")));
if let Some((_, old_revision, _)) = &previous
&& revision <= *old_revision
{
return Err(format!(
"Installed revision {old_revision} is not older than revision {revision}"
));
}
if previous.is_none() && destination.exists() {
return Err("Pack destination already exists; remove or rename it before importing".into());
}
if let Some((_, _, expected)) = previous
&& fingerprint(&bounded_read(&destination)?) != expected
{
return Err("Installed pack changed on disk; restart before updating it".into());
}
if !destination.exists() && zip_paths(directory).is_ok_and(|paths| paths.len() >= MAX_PACKS) {
return Err("Too many packs (maximum 32)".into());
}
crate::settings::atomic_write(&destination, bytes)?;
Ok(destination)
}
pub fn install_language(root: &Path, source: &Path) -> Result<String, String> {
let bytes = bounded_read(source)?;
let parsed = parse_language(&bytes, PathBuf::new())?;
let installed = LANGUAGE_PACKS.read().unwrap().clone();
for old in &installed {
if old.manifest.id != parsed.manifest.id
&& old.manifest.languages.iter().any(|old_language| {
parsed
.manifest
.languages
.iter()
.any(|new| new.locale == old_language.locale)
})
{
return Err(format!(
"Locale belongs to installed pack {}",
old.manifest.id
));
}
}
let previous = installed
.iter()
.find(|pack| pack.manifest.id == parsed.manifest.id)
.map(|pack| (pack.path.clone(), pack.manifest.revision, pack.fingerprint));
let directory = root.join("language-packs");
let path = install_bytes(
&directory,
&parsed.manifest.id,
parsed.manifest.revision,
previous,
&bytes,
)?;
let id = parsed.manifest.id.clone();
let parsed = parse_language(&bytes, path)?;
let mut packs = LANGUAGE_PACKS.write().unwrap();
packs.retain(|pack| pack.manifest.id != id);
packs.push(parsed);
packs.sort_by(|a, b| a.manifest.id.cmp(&b.manifest.id));
Ok(id)
}
pub fn install_theme(root: &Path, source: &Path) -> Result<String, String> {
let bytes = bounded_read(source)?;
let parsed = parse_theme(&bytes, PathBuf::new())?;
let installed = THEME_PACKS.read().unwrap().clone();
let previous = installed
.iter()
.find(|pack| pack.manifest.id == parsed.manifest.id)
.map(|pack| (pack.path.clone(), pack.manifest.revision, pack.fingerprint));
let directory = root.join("theme-packs");
let path = install_bytes(
&directory,
&parsed.manifest.id,
parsed.manifest.revision,
previous,
&bytes,
)?;
let id = parsed.manifest.id.clone();
let parsed = parse_theme(&bytes, path)?;
let mut packs = THEME_PACKS.write().unwrap();
packs.retain(|pack| pack.manifest.id != id);
packs.push(parsed);
packs.sort_by(|a, b| a.manifest.id.cmp(&b.manifest.id));
Ok(id)
}
pub fn language_packs() -> Vec<InstalledLanguagePack> {
LANGUAGE_PACKS
.read()
.unwrap()
.iter()
.map(|pack| InstalledLanguagePack {
id: pack.manifest.id.clone(),
revision: pack.manifest.revision,
languages: pack.manifest.languages.clone(),
})
.collect()
}
pub fn theme_packs() -> Vec<InstalledThemePack> {
THEME_PACKS
.read()
.unwrap()
.iter()
.map(|pack| InstalledThemePack {
id: pack.manifest.id.clone(),
revision: pack.manifest.revision,
themes: pack.manifest.themes.clone(),
notices: pack.manifest.notices.clone(),
})
.collect()
}
pub fn translation(locale: &str, source: &str) -> Option<&'static str> {
LANGUAGE_PACKS
.read()
.unwrap()
.iter()
.find_map(|pack| pack.catalogs.get(locale)?.get(source).copied())
}
pub fn language_name(locale: &str) -> Option<String> {
LANGUAGE_PACKS.read().unwrap().iter().find_map(|pack| {
pack.manifest
.languages
.iter()
.find(|language| language.locale == locale)
.map(|language| format!("{} — {}", language.native_name, language.name))
})
}
pub fn theme_choices() -> Vec<(String, String)> {
THEME_PACKS
.read()
.unwrap()
.iter()
.flat_map(|pack| {
pack.manifest.themes.iter().map(|theme| {
(
format!("{}/{}", pack.manifest.id, theme.id),
theme.name.clone(),
)
})
})
.collect()
}
pub fn packed_theme(choice: &str) -> Option<(Palette, bool, String)> {
let (pack_id, theme_id) = choice.split_once('/')?;
THEME_PACKS.read().unwrap().iter().find_map(|pack| {
if pack.manifest.id != pack_id {
return None;
}
let theme = pack
.manifest
.themes
.iter()
.find(|theme| theme.id == theme_id)?;
Some((
theme.colors.palette().ok()?,
theme.light,
theme.name.clone(),
))
})
}
pub fn pack_root(settings_path: &Path) -> Result<&Path, String> {
settings_path
.parent()
.ok_or("Settings directory unavailable".into())
}
#[cfg(test)]
mod tests {
use super::*;
use std::io::Write;
fn archive(files: &[(&str, &[u8])]) -> Vec<u8> {
let mut writer = zip::ZipWriter::new(std::io::Cursor::new(Vec::new()));
for (name, bytes) in files {
writer
.start_file(*name, zip::write::SimpleFileOptions::default())
.unwrap();
writer.write_all(bytes).unwrap();
}
writer.finish().unwrap().into_inner()
}
#[test]
fn example_packs_install_load_and_resolve() {
let temp = tempfile::tempdir().unwrap();
let language = temp.path().join("language.zip");
let theme = temp.path().join("theme.zip");
std::fs::write(
&language,
include_bytes!("../../../docs/packs/deckstride-language-pack.zip"),
)
.unwrap();
std::fs::write(
&theme,
include_bytes!("../../../docs/packs/deckstride-theme-pack.zip"),
)
.unwrap();
assert_eq!(
install_language(temp.path(), &language).unwrap(),
"example-language"
);
assert_eq!(translation("eo-example", "Close"), Some("Fermi"));
assert_eq!(install_theme(temp.path(), &theme).unwrap(), "example-theme");
assert!(packed_theme("example-theme/night").is_some());
assert!(load(temp.path()).is_empty());
assert_eq!(language_packs()[0].revision, 1);
assert_eq!(theme_packs()[0].revision, 1);
let ctx = egui::Context::default();
crate::localization::apply_selected(
&ctx,
&crate::localization::Language::En,
Some("eo-example"),
);
assert_eq!(crate::localization::tr(&ctx, "Close"), "Fermi");
crate::theme::apply_selected(
&ctx,
crate::theme::Theme::Midra,
Some("example-theme/night"),
);
assert_eq!(
ctx.global_style().visuals.panel_fill,
color("#101820").unwrap()
);
let mut manifest: serde_json::Value = serde_json::from_str(include_str!(
"../../../docs/packs/language-example/manifest.json"
))
.unwrap();
manifest["revision"] = 2.into();
let updated = archive(&[
("manifest.json", &serde_json::to_vec(&manifest).unwrap()),
(
"eo-example.json",
include_bytes!("../../../docs/packs/language-example/eo-example.json"),
),
]);
std::fs::write(
temp.path().join("language-packs/example-language.zip"),
b"changed",
)
.unwrap();
std::fs::write(&language, updated).unwrap();
assert!(
install_language(temp.path(), &language)
.unwrap_err()
.contains("changed on disk")
);
}
#[test]
fn malformed_and_traversing_archives_are_rejected() {
let bad = archive(&[("../manifest.json", b"{}")]);
assert!(parse_language(&bad, PathBuf::new()).is_err());
assert!(parse_theme(&bad, PathBuf::new()).is_err());
}
}

View File

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

View File

@ -211,6 +211,49 @@ impl Default for SlideColors {
}
}
}
/// Per-monitor preference that takes priority over role-wide fullscreen commands.
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum ScreenMode {
#[default]
FollowGlobal,
AlwaysFullscreen,
AlwaysWindowed,
}
impl ScreenMode {
pub fn fullscreen(self, global: bool) -> bool {
match self {
Self::FollowGlobal => global,
Self::AlwaysFullscreen => true,
Self::AlwaysWindowed => false,
}
}
pub fn label(self) -> &'static str {
match self {
Self::FollowGlobal => "Follow global",
Self::AlwaysFullscreen => "Always fullscreen",
Self::AlwaysWindowed => "Always windowed",
}
}
}
pub fn validate_screen_modes(modes: &BTreeMap<String, ScreenMode>) -> Result<(), String> {
if modes.len() > 128 || modes.keys().any(|id| id.is_empty() || id.len() > 1024) {
return Err(
"Invalid screen modes: at most 128 nonempty monitor IDs of at most 1024 bytes".into(),
);
}
Ok(())
}
pub fn validate_single_screens(displays: &[String]) -> Result<(), String> {
let unique: std::collections::HashSet<_> = displays.iter().collect();
if displays.len() > 32
|| unique.len() != displays.len()
|| displays.iter().any(|id| id.is_empty() || id.len() > 1024)
{
return Err("Invalid single-screen assignments".into());
}
Ok(())
}
/// Saved visual layouts for one monitor; shared timer behavior uses legacy layouts.
#[derive(Clone, Debug, Default, Serialize, Deserialize)]
#[serde(default)]
@ -226,6 +269,8 @@ pub struct Settings {
pub layout: Layout,
pub projects: BTreeMap<String, Layout>,
pub display_layouts: BTreeMap<String, DisplayLayouts>,
pub screen_modes: BTreeMap<String, ScreenMode>,
pub single_screens: Vec<String>,
pub routes: Routes,
pub presenter_fullscreen: bool,
pub presentation_fullscreen: bool,
@ -234,11 +279,16 @@ pub struct Settings {
pub buffer_mib: u32,
pub disk_cache: crate::cache::Policy,
pub auto_show: bool,
pub autoplay_enabled: bool,
pub autoplay_seconds: f32,
pub autoplay_loop: bool,
pub blank_picture: bool,
pub zoom_enabled: bool,
pub zoom_keep_fitted_area: bool,
pub theme: crate::theme::Theme,
pub theme_pack: Option<String>,
pub language: crate::localization::Language,
pub language_pack: Option<String>,
}
/// Choose a per-process decoded-frame budget from available physical RAM.
/// Prefer 15%, with a soft 512 MiB floor that never exceeds 20% (except the
@ -272,6 +322,8 @@ impl Default for Settings {
layout: Layout::default(),
projects: BTreeMap::new(),
display_layouts: BTreeMap::new(),
screen_modes: BTreeMap::new(),
single_screens: Vec::new(),
routes: Routes::default(),
presenter_fullscreen: true,
presentation_fullscreen: true,
@ -280,11 +332,16 @@ impl Default for Settings {
buffer_mib: default_buffer_mib(),
disk_cache: Default::default(),
auto_show: true,
autoplay_enabled: false,
autoplay_seconds: 5.0,
autoplay_loop: false,
blank_picture: false,
zoom_enabled: false,
zoom_keep_fitted_area: false,
theme: Default::default(),
theme_pack: None,
language: Default::default(),
language_pack: None,
}
}
}
@ -293,10 +350,24 @@ impl Settings {
if self.version != 1 {
return Err(format!("Unsupported settings version {}", self.version));
}
if self
.theme_pack
.as_deref()
.is_some_and(|choice| !crate::packs::valid_theme_choice(choice))
|| self
.language_pack
.as_deref()
.is_some_and(|locale| !crate::packs::valid_id(locale))
{
return Err("Invalid language or theme pack choice".into());
}
self.disk_cache.validate()?;
if !(64..=16384).contains(&self.buffer_mib) {
return Err("RAM buffer must be 64–16384 MiB per process".into());
}
if !self.autoplay_seconds.is_finite() || !(0.25..=3600.0).contains(&self.autoplay_seconds) {
return Err("Autoplay timing must be 0.25–3600 seconds".into());
}
if self.projects.len() > 4096 || !(100. ..=400.).contains(&self.thumbnail_size) {
return Err("Invalid settings limits".into());
}
@ -319,6 +390,8 @@ impl Settings {
layout.validate()?;
}
}
validate_single_screens(&self.single_screens)?;
validate_screen_modes(&self.screen_modes)?;
self.routes.validate()?;
self.layout.validate()?;
for layout in self.projects.values() {
@ -342,19 +415,54 @@ impl Settings {
self.projects.get(key).unwrap_or(&self.layout).clone()
}
}
fn select_renamed_paths(
settings: PathBuf,
cache: PathBuf,
legacy_settings: PathBuf,
legacy_cache: PathBuf,
) -> (PathBuf, PathBuf) {
if !settings.exists()
&& legacy_settings.is_file()
&& let Ok(value) = read(&legacy_settings)
{
let _ = write(&settings, &value);
}
let settings = if settings.exists() || !legacy_settings.is_file() {
settings
} else {
legacy_settings
};
let cache = if cache.exists() || !legacy_cache.exists() {
cache
} else {
legacy_cache
};
(settings, cache)
}
pub fn paths() -> Result<(PathBuf, PathBuf), String> {
let dirs = directories::ProjectDirs::from("com", "Beffroi", "PdfPresenter")
let dirs = directories::ProjectDirs::from("com", "Beffroi", "Deckstride")
.ok_or("No user configuration directory")?;
let legacy_dirs = directories::ProjectDirs::from("com", "Beffroi", "PdfPresenter")
.ok_or("No user configuration directory")?;
#[cfg(target_os = "linux")]
let config = directories::BaseDirs::new()
.ok_or("No user configuration directory")?
.config_dir()
.join("pdf-presenter");
let (config, legacy_config) = {
let base = directories::BaseDirs::new().ok_or("No user configuration directory")?;
(
base.config_dir().join("deckstride"),
base.config_dir().join("pdf-presenter"),
)
};
#[cfg(not(target_os = "linux"))]
let config = dirs.config_dir().to_path_buf();
Ok((
let (config, legacy_config) = (
dirs.config_dir().to_path_buf(),
legacy_dirs.config_dir().to_path_buf(),
);
Ok(select_renamed_paths(
config.join("settings.toml"),
dirs.cache_dir().join("slides-v1"),
legacy_config.join("settings.toml"),
legacy_dirs.cache_dir().join("slides-v1"),
))
}
pub fn read(path: &Path) -> Result<Settings, String> {
@ -401,3 +509,31 @@ pub fn atomic_write(path: &Path, bytes: &[u8]) -> Result<(), String> {
pub fn project_key(path: &Path) -> String {
format!("{:x}", Sha256::digest(path.as_os_str().as_encoded_bytes()))
}
#[cfg(test)]
mod rename_tests {
use super::*;
#[test]
fn renamed_paths_copy_settings_and_reuse_a_warm_cache() {
let temp = tempfile::tempdir().unwrap();
let settings = temp.path().join("new/settings.toml");
let cache = temp.path().join("new/cache");
let legacy_settings = temp.path().join("legacy/settings.toml");
let legacy_cache = temp.path().join("legacy/cache");
write(&legacy_settings, &Settings::default()).unwrap();
std::fs::create_dir_all(&legacy_cache).unwrap();
let selected = select_renamed_paths(
settings.clone(),
cache,
legacy_settings,
legacy_cache.clone(),
);
assert_eq!(selected, (settings.clone(), legacy_cache));
let migrated = read(&settings).unwrap();
assert_eq!(migrated.version, 1);
assert_eq!(migrated.layout, Layout::default());
}
}

View File

@ -23,6 +23,8 @@ pub enum Action {
Pick(bool),
PickNotes,
PickBlankPicture,
PickLanguagePack,
PickThemePack,
SetBlankPicture(PathBuf),
ClearBlankPicture,
#[cfg(target_os = "windows")]
@ -47,12 +49,15 @@ pub enum Action {
UseGlobal,
ApplyRoutes,
SwapRoutes,
StartupSingleScreen(bool),
KeepRoutes,
RevertRoutes,
OpenBrowser,
CloseBrowser,
Refresh,
Exit,
ConfirmExit,
CancelExit,
ToggleFullscreen,
ToggleTimer,
ResetTimer,
@ -87,20 +92,29 @@ pub struct RouteTrial {
previous: Routes,
presenter_fullscreen: bool,
presentation_fullscreen: bool,
screen_modes: std::collections::BTreeMap<String, crate::settings::ScreenMode>,
single_screens: Vec<String>,
}
#[derive(Default)]
pub struct PresenterView {
pub layout: Layout,
pub layout_open: bool,
pub layout_target: Option<String>,
pub preferences_open: bool,
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,
pub draft_single_screens: Vec<String>,
startup_displays_observed: bool,
pub startup_single_screen: Option<String>,
pub draft_screen_modes: std::collections::BTreeMap<String, crate::settings::ScreenMode>,
pub draft_presenter_fullscreen: bool,
pub draft_presentation_fullscreen: bool,
pub route_trial: Option<RouteTrial>,
@ -133,6 +147,7 @@ pub struct Studio {
pub visible_thumbs: HashSet<usize>,
pub layout_open: bool,
pub displays_open: bool,
pub preferences_open: bool,
pub menu_open: bool,
pub browser_open: bool,
pub browser_selected: usize,
@ -148,6 +163,8 @@ pub struct Studio {
pub cache_status: String,
startup_cache_pending: bool,
navigation_settle: Option<Instant>,
autoplay_deadline: Option<Instant>,
autoplay_finished: bool,
pub fg: Bridge,
pub bg: Bridge,
pub io: Bridge,
@ -175,6 +192,7 @@ pub struct Studio {
pub new_overlay: bool,
pub new_output: bool,
pub close_requested: bool,
pub quit_confirmation: bool,
failed: HashSet<(usize, u32)>,
pub smoke: bool,
pub startup: Instant,
@ -193,7 +211,7 @@ impl Studio {
let (mut settings_path, mut cache_path) = settings::paths().unwrap_or_else(|_| {
(
PathBuf::from("settings.toml"),
std::env::temp_dir().join("pdf-presenter-cache"),
std::env::temp_dir().join("deckstride-cache"),
)
});
let smoke_dir = if smoke {
@ -205,15 +223,28 @@ impl Studio {
settings_path = dir.path().join("settings.toml");
cache_path = dir.path().join("cache");
}
let pack_errors = if smoke {
Vec::new()
} else {
settings_path
.parent()
.map(crate::packs::load)
.unwrap_or_else(|| vec!["Settings directory unavailable for packs".into()])
};
let io = Bridge::with_program(Duration::from_secs(10), worker_program.clone());
io.submit(0, 0, Request::LoadSettings(settings_path.clone()));
Self {
settings: Settings::default(),
layout: Layout::default(),
presenter_views: HashMap::new(),
presenter_views_dirty: false,
monitors: vec![],
routes: Routes::default(),
draft_routes: Routes::default(),
draft_single_screens: Vec::new(),
startup_displays_observed: false,
startup_single_screen: None,
draft_screen_modes: Default::default(),
draft_presenter_fullscreen: true,
draft_presentation_fullscreen: true,
route_trial: None,
@ -226,7 +257,14 @@ impl Studio {
blank_picture: None,
blank_busy: false,
blank_loader: Bridge::with_program(Duration::from_secs(15), worker_program.clone()),
status: "Ready — open a PDF or picture folder, or drop it here.".into(),
status: if pack_errors.is_empty() {
"Ready — open a PDF or picture folder, or drop it here.".into()
} else {
format!(
"Some language/theme packs were skipped: {}",
pack_errors.join("; ")
)
},
awake_status: "Sleep protection starting…".into(),
generation: 0,
frames: HashMap::new(),
@ -246,6 +284,7 @@ impl Studio {
visible_thumbs: HashSet::new(),
layout_open: false,
displays_open: false,
preferences_open: false,
menu_open: false,
browser_open: false,
browser_selected: 0,
@ -261,6 +300,8 @@ impl Studio {
cache_status: String::new(),
startup_cache_pending: true,
navigation_settle: None,
autoplay_deadline: None,
autoplay_finished: false,
fg: Bridge::with_program(Duration::from_secs(30), worker_program.clone()),
bg: Bridge::with_program(Duration::from_secs(30), worker_program.clone()),
io,
@ -288,6 +329,7 @@ impl Studio {
new_overlay: false,
new_output: true,
close_requested: false,
quit_confirmation: false,
failed: HashSet::new(),
smoke,
startup: Instant::now(),
@ -303,6 +345,9 @@ impl Studio {
.as_ref()
.map_or_else(|| "empty".into(), |d| d.key.clone())
}
pub fn executable_path(&self) -> &std::path::Path {
&self.worker_program
}
pub fn frame(&self, page: usize) -> Option<Arc<Frame>> {
[self.target_edge, 512, 1280, 320]
.iter()
@ -331,6 +376,60 @@ impl Studio {
pub fn frame_info(&self) -> Option<FrameInfo> {
self.full_frame(self.requested).map(|f| f.info.clone())
}
/// Called on the first native discovery, including zero displays. Never rearmed by hotplug.
pub fn observe_startup_displays(&mut self, count: usize, only_id: Option<&str>) {
if !self.startup_displays_observed {
self.startup_displays_observed = true;
self.startup_single_screen = only_id.filter(|_| count == 1).map(str::to_owned);
}
}
pub fn is_single_screen(&self, id: &str) -> bool {
self.routes.presenter.iter().any(|display| display == id)
&& self
.route_trial
.as_ref()
.map_or(&self.settings.single_screens, |trial| &trial.single_screens)
.iter()
.any(|display| display == id)
}
pub fn startup_single_offer(&self) -> bool {
self.initialized
&& self.route_trial.is_none()
&& !self.quit_confirmation
&& self.startup_single_screen.as_ref().is_some_and(|id| {
self.monitors.len() == 1
&& self.monitors[0].id == *id
&& self.routes.presenter.contains(id)
&& !self.is_single_screen(id)
})
}
pub fn swap_draft_groups(&mut self) {
if self.draft_routes.presentation.is_empty()
|| (!self.draft_routes.presenter.is_empty()
&& self
.draft_routes
.presenter
.iter()
.all(|id| self.draft_single_screens.contains(id)))
{
return;
}
let singles: Vec<_> = self
.draft_routes
.presenter
.iter()
.filter(|id| self.draft_single_screens.contains(id))
.cloned()
.collect();
self.draft_routes
.presenter
.retain(|id| !singles.contains(id));
std::mem::swap(
&mut self.draft_routes.presenter,
&mut self.draft_routes.presentation,
);
self.draft_routes.presenter.extend(singles);
}
pub fn set_monitors(&mut self, monitors: Vec<Monitor>, primary: usize) {
let ids = monitors.iter().map(|m| m.id.clone()).collect::<Vec<_>>();
let changed = self
@ -344,6 +443,13 @@ impl Studio {
.collect::<Vec<_>>();
let previous_outputs = self.routes.presentation.clone();
let recovering = !self.monitors.is_empty();
if self
.startup_single_screen
.as_ref()
.is_some_and(|id| monitors.len() != 1 || monitors[0].id != *id)
{
self.startup_single_screen = None;
}
self.monitors = monitors;
if changed {
self.execute(Action::RevertRoutes);
@ -415,6 +521,63 @@ impl Studio {
pub fn presentation_action(&mut self) {
self.timer
.presentation_action(Instant::now(), self.layout.timer_autostart);
self.restart_autoplay();
}
fn restart_autoplay(&mut self) {
self.autoplay_deadline = None;
self.autoplay_finished = false;
}
pub fn autoplay_settings_changed(&mut self) {
self.restart_autoplay();
self.save_preferences();
}
fn poll_autoplay_at(&mut self, now: Instant) -> bool {
let paused = !self.settings.autoplay_enabled
|| !self.initialized
|| self.loading
|| self.pending_open.is_some()
|| self.blanked
|| self.dialog_busy
|| self.route_trial.is_some()
|| self.startup_single_offer()
|| self.notes_editor.is_some()
|| self.notes_import.is_some()
|| self.quit_confirmation
|| self.count() == 0;
if paused {
self.autoplay_deadline = None;
return false;
}
if self.autoplay_finished {
return false;
}
let visible = self.displayed == Some(self.requested)
|| (self.routes.presentation.is_empty() && self.frame(self.requested).is_some());
if !visible {
self.autoplay_deadline = None;
return false;
}
let deadline = self
.autoplay_deadline
.get_or_insert_with(|| now + Duration::from_secs_f32(self.settings.autoplay_seconds));
if now < *deadline {
return false;
}
let next = if self.requested + 1 < self.count() {
Some(self.requested + 1)
} else if self.settings.autoplay_loop && self.count() > 1 {
Some(0)
} else {
None
};
self.autoplay_deadline = None;
if let Some(next) = next {
self.execute(Action::Go(next));
true
} else {
self.autoplay_finished = true;
false
}
}
pub fn execute(&mut self, action: Action) {
match action {
@ -459,13 +622,13 @@ 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 => {
self.status = match crate::windows_integration::register_pdf_association() {
Ok(()) => "Choose PDF Presenter for .pdf in Windows Default Apps. PDF files will then use its icon.".into(),
Err(error) => format!("Could not register PDF Presenter: {error}"),
Ok(()) => "Choose Deckstride for .pdf in Windows Default Apps. PDF files will then use its icon.".into(),
Err(error) => format!("Could not register Deckstride: {error}"),
};
}
Action::PickNotes => {
@ -485,6 +648,25 @@ impl Studio {
self.status = "Choose a TXT or Markdown notes file.".into();
}
}
pack_action @ (Action::PickLanguagePack | Action::PickThemePack) => {
if self.initialized && !self.dialog_busy {
let language = matches!(pack_action, Action::PickLanguagePack);
self.dialog_busy = self.dialog.submit(
0,
if language { 3 } else { 4 },
Request::PickPack {
language,
owner: self.dialog_owner,
},
);
self.status = if language {
"Choose a Deckstride language-pack ZIP."
} else {
"Choose a Deckstride theme-pack ZIP."
}
.into();
}
}
Action::ImportNotes(import) => {
if self.loading
|| self.notes_editor.is_some()
@ -593,6 +775,7 @@ impl Studio {
return;
}
if page < self.count() {
self.restart_autoplay();
if page != self.requested
&& self.fg_busy
&& !self.loading
@ -703,16 +886,28 @@ impl Studio {
self.layout = self.settings.layout.clone();
self.pending_save = true;
}
Action::StartupSingleScreen(accept) => {
if !self.startup_single_offer() {
return;
}
let id = self.startup_single_screen.take().unwrap();
if accept {
self.begin_display_edit();
self.draft_single_screens.push(id);
self.execute(Action::ApplyRoutes);
}
}
Action::SwapRoutes => {
if self.route_trial.is_none()
&& !self.presentation_started
&& self
.routes
.presenter
.iter()
.any(|id| !self.is_single_screen(id))
&& !self.routes.presentation.is_empty()
{
self.begin_display_edit();
std::mem::swap(
&mut self.draft_routes.presenter,
&mut self.draft_routes.presentation,
);
self.swap_draft_groups();
self.execute(Action::ApplyRoutes);
}
}
@ -724,7 +919,15 @@ impl Studio {
return;
}
if self.draft_routes.presenter.is_empty() {
self.status = "Choose at least one presenter screen.".into();
self.status = "Choose at least one presenter or single-screen display.".into();
} else if let Err(e) =
crate::settings::validate_single_screens(&self.draft_single_screens)
{
self.status = e;
} else if let Err(e) =
crate::settings::validate_screen_modes(&self.draft_screen_modes)
{
self.status = e;
} else if let Err(e) = self.draft_routes.validate() {
self.status = e;
} else if self
@ -736,6 +939,7 @@ impl Studio {
{
self.status = "A selected display is no longer connected.".into();
} else {
self.startup_single_screen = None;
self.next_route_trial += 1;
self.route_trial = Some(RouteTrial {
id: self.next_route_trial,
@ -743,6 +947,8 @@ impl Studio {
previous: self.routes.clone(),
presenter_fullscreen: self.draft_presenter_fullscreen,
presentation_fullscreen: self.draft_presentation_fullscreen,
screen_modes: self.draft_screen_modes.clone(),
single_screens: self.draft_single_screens.clone(),
});
self.routes = self.draft_routes.clone();
self.dirty_routes = true;
@ -757,6 +963,8 @@ impl Studio {
self.execute(Action::RevertRoutes);
return;
}
self.settings.single_screens = trial.single_screens;
self.settings.screen_modes = trial.screen_modes;
self.settings.routes = self.routes.clone();
self.settings.presenter_fullscreen = trial.presenter_fullscreen;
self.settings.presentation_fullscreen = trial.presentation_fullscreen;
@ -787,18 +995,17 @@ impl Studio {
}
Action::Refresh => self.dirty_routes = true,
Action::Exit => {
if self.notes_import.as_ref().is_some_and(|i| i.busy) {
self.status = "Wait for notes import to finish before closing.".into();
return;
}
if self
.notes_editor
.as_ref()
.is_some_and(|editor| editor.busy || editor.text != editor.saved_text)
{
self.status = "Save or discard notes before closing the presentation.".into();
} else {
self.close_requested = true;
self.quit_confirmation = true;
}
Action::CancelExit => self.quit_confirmation = false,
Action::ConfirmExit => {
if self.quit_confirmation {
if let Some(reason) = self.quit_block_reason() {
self.status = reason.into();
} else {
self.quit_confirmation = false;
self.close_requested = true;
}
}
}
command @ (Action::EditNotes | Action::ReloadNotes) => {
@ -870,6 +1077,8 @@ impl Studio {
}
let fullscreen = !(self.presenter_fullscreen() && self.presentation_fullscreen());
self.draft_routes = self.routes.clone();
self.draft_single_screens = self.settings.single_screens.clone();
self.draft_screen_modes = self.settings.screen_modes.clone();
self.draft_presenter_fullscreen = fullscreen;
self.draft_presentation_fullscreen = fullscreen;
self.execute(Action::ApplyRoutes);
@ -896,7 +1105,31 @@ impl Studio {
_ => {}
}
}
pub fn quit_block_reason(&self) -> Option<&'static str> {
if self.notes_import.as_ref().is_some_and(|i| i.busy) {
Some("Wait for notes import to finish before closing.")
} else if self
.notes_editor
.as_ref()
.is_some_and(|e| e.busy || e.text != e.saved_text)
{
Some("Save or discard notes before closing the presentation.")
} else {
None
}
}
pub fn screen_fullscreen(&self, display: &str, global: bool) -> bool {
self.route_trial
.as_ref()
.map_or(&self.settings.screen_modes, |trial| &trial.screen_modes)
.get(display)
.copied()
.unwrap_or_default()
.fullscreen(global)
}
pub fn begin_display_edit(&mut self) {
self.draft_single_screens = self.settings.single_screens.clone();
self.draft_screen_modes = self.settings.screen_modes.clone();
self.draft_routes = self.routes.clone();
self.draft_presenter_fullscreen = self.settings.presenter_fullscreen;
self.draft_presentation_fullscreen = self.settings.presentation_fullscreen;
@ -951,6 +1184,14 @@ impl Studio {
}
}
pub fn poll(&mut self) {
if self.initialized
&& self
.startup_single_screen
.as_ref()
.is_some_and(|id| self.is_single_screen(id))
{
self.startup_single_screen = None;
}
while let Ok(c) = self.blank_loader.rx.try_recv() {
self.blank_busy = false;
let result = c.result.and_then(|p| {
@ -966,7 +1207,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}"),
}
@ -1108,6 +1349,19 @@ impl Studio {
if let Some(path) = p.reply.picked {
if c.tag == 2 {
self.execute(Action::SetBlankPicture(path));
} else if c.tag == 3 || c.tag == 4 {
let result =
crate::packs::pack_root(&self.settings_path).and_then(|root| {
if c.tag == 3 {
crate::packs::install_language(root, &path)
.map(|id| format!("Installed language pack {id}."))
} else {
crate::packs::install_theme(root, &path)
.map(|id| format!("Installed theme pack {id}."))
}
});
self.status = result
.unwrap_or_else(|error| format!("Could not install pack: {error}"));
} else if c.tag == 1 {
if c.generation == self.generation {
self.execute(Action::ImportNotes(path));
@ -1195,6 +1449,7 @@ impl Studio {
self.requested = 0;
self.presentation_started = false;
self.timer = crate::timer::Timer::default();
self.restart_autoplay();
self.displayed = None;
self.layout = self.settings.for_project(&info.key);
self.presenter_views.clear();
@ -1388,6 +1643,7 @@ impl Studio {
{
self.clean_cache(false);
}
self.poll_autoplay_at(Instant::now());
}
fn schedule(&mut self, page: usize, edge: u32, foreground: bool) {
// Reserve both worker slots before admission, including progressive previews.
@ -1461,7 +1717,8 @@ impl Studio {
.find_map(|id| self.monitors.iter().find(|m| &m.id == id))?;
if let Some(viewport) = &self.output_viewport
&& viewport.monitor == monitor.id
&& viewport.fullscreen == self.presentation_fullscreen()
&& viewport.fullscreen
== self.screen_fullscreen(&monitor.id, self.presentation_fullscreen())
&& viewport.size.iter().all(|v| *v > 0)
{
return Some(viewport.size);
@ -1691,6 +1948,57 @@ impl Studio {
mod tests {
use super::*;
#[test]
fn autoplay_times_visible_slides_pauses_and_loops_safely() {
let mut s = Studio::new(true, None);
s.initialized = true;
s.deck = Some(DeckInfo {
path: "test.pdf".into(),
key: "test".into(),
title: "Test".into(),
names: vec![String::new(); 3],
notes: vec![],
warnings: vec![],
sha256: String::new(),
});
s.settings.autoplay_enabled = true;
s.settings.autoplay_seconds = 2.0;
s.blanked = false;
s.displayed = Some(0);
let start = Instant::now();
assert!(!s.poll_autoplay_at(start));
assert!(!s.poll_autoplay_at(start + Duration::from_millis(1999)));
assert!(s.poll_autoplay_at(start + Duration::from_secs(2)));
assert_eq!(s.requested, 1);
// A render/output delay never consumes the new slide's interval.
assert!(!s.poll_autoplay_at(start + Duration::from_secs(20)));
assert_eq!(s.requested, 1);
s.displayed = Some(1);
assert!(!s.poll_autoplay_at(start + Duration::from_secs(20)));
assert!(s.poll_autoplay_at(start + Duration::from_secs(22)));
assert_eq!(s.requested, 2);
s.displayed = Some(2);
assert!(!s.poll_autoplay_at(start + Duration::from_secs(22)));
assert!(!s.poll_autoplay_at(start + Duration::from_secs(24)));
assert_eq!(s.requested, 2, "autoplay stops at the final slide");
s.settings.autoplay_loop = true;
s.autoplay_settings_changed();
assert!(!s.poll_autoplay_at(start + Duration::from_secs(30)));
assert!(s.poll_autoplay_at(start + Duration::from_secs(32)));
assert_eq!(s.requested, 0);
s.displayed = Some(0);
s.blanked = true;
assert!(!s.poll_autoplay_at(start + Duration::from_secs(40)));
s.blanked = false;
assert!(!s.poll_autoplay_at(start + Duration::from_secs(50)));
assert!(s.poll_autoplay_at(start + Duration::from_secs(52)));
assert_eq!(s.requested, 1, "unblanking starts a fresh interval");
}
#[test]
fn repeated_navigation_coalesces_rendering_and_clamps_without_blanking() {
let mut s = Studio::new(true, None);

View File

@ -9,7 +9,7 @@ const MUTED: Color32 = Color32::from_rgb(165, 181, 201);
const CYAN: Color32 = Color32::from_rgb(102, 219, 239);
const AMBER: Color32 = Color32::from_rgb(246, 197, 119);
const PURPLE: Color32 = Color32::from_rgb(102, 85, 217);
#[derive(Clone, Debug, Default, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum Theme {
#[default]
@ -53,6 +53,12 @@ pub struct Palette {
pub purple: Color32,
}
#[derive(Clone, Debug, PartialEq, Eq)]
enum AppliedTheme {
Builtin(Theme),
Pack(String),
}
impl Theme {
pub const ALL: [Self; 20] = [
Self::Midra,
@ -76,7 +82,7 @@ impl Theme {
Self::VerdantRebel,
Self::WeicatIndustrial,
];
pub fn name(&self) -> &str {
pub fn name(&self) -> &'static str {
match self {
Self::Midra => "Midra Dark",
Self::HighContrast => "High Contrast",
@ -276,49 +282,78 @@ impl Theme {
}
}
pub fn apply(&self, ctx: &egui::Context) {
let p = self.palette();
let mut v = if self.is_light() {
egui::Visuals::light()
} else {
egui::Visuals::dark()
};
v.override_text_color = Some(p.text);
v.panel_fill = p.bg;
v.window_fill = p.panel;
v.extreme_bg_color = p.field;
v.faint_bg_color = p.bg;
v.hyperlink_color = p.cyan;
v.warn_fg_color = p.amber;
v.error_fg_color = if self.is_light() {
Color32::from_rgb(165, 30, 40)
} else {
Color32::LIGHT_RED
};
v.window_stroke = egui::Stroke::new(1_f32, p.line);
v.selection.bg_fill = p.purple;
v.selection.stroke.color = p.text;
for (w, fill) in [
(&mut v.widgets.noninteractive, p.panel),
(&mut v.widgets.inactive, p.field),
(&mut v.widgets.hovered, p.panel.lerp_to_gamma(p.text, 0.08)),
(&mut v.widgets.active, p.purple),
(&mut v.widgets.open, p.panel),
] {
w.bg_fill = fill;
w.weak_bg_fill = fill;
w.bg_stroke = egui::Stroke::new(
if *self == Self::HighContrast {
2_f32
} else {
1_f32
},
p.line,
);
w.fg_stroke = egui::Stroke::new(1_f32, p.text);
}
ctx.set_visuals(v);
apply_palette(
ctx,
AppliedTheme::Builtin(*self),
self.palette(),
self.is_light(),
*self == Self::HighContrast,
);
}
}
pub fn apply_selected(ctx: &egui::Context, builtin: Theme, packed: Option<&str>) {
if let Some(choice) = packed
&& let Some((palette, light, _)) = crate::packs::packed_theme(choice)
{
apply_palette(
ctx,
AppliedTheme::Pack(choice.to_owned()),
palette,
light,
false,
);
} else {
builtin.apply(ctx);
}
}
fn apply_palette(
ctx: &egui::Context,
choice: AppliedTheme,
p: Palette,
light: bool,
high_contrast: bool,
) {
let applied = egui::Id::new("deckstride-theme");
if ctx.data(|data| data.get_temp::<AppliedTheme>(applied)) == Some(choice.clone()) {
return;
}
let mut v = if light {
egui::Visuals::light()
} else {
egui::Visuals::dark()
};
v.override_text_color = Some(p.text);
v.panel_fill = p.bg;
v.window_fill = p.panel;
v.extreme_bg_color = p.field;
v.faint_bg_color = p.bg;
v.hyperlink_color = p.cyan;
v.warn_fg_color = p.amber;
v.error_fg_color = if light {
Color32::from_rgb(165, 30, 40)
} else {
Color32::LIGHT_RED
};
v.window_stroke = egui::Stroke::new(1_f32, p.line);
v.selection.bg_fill = p.purple;
v.selection.stroke.color = p.text;
for (w, fill) in [
(&mut v.widgets.noninteractive, p.panel),
(&mut v.widgets.inactive, p.field),
(&mut v.widgets.hovered, p.panel.lerp_to_gamma(p.text, 0.08)),
(&mut v.widgets.active, p.purple),
(&mut v.widgets.open, p.panel),
] {
w.bg_fill = fill;
w.weak_bg_fill = fill;
w.bg_stroke = egui::Stroke::new(if high_contrast { 2_f32 } else { 1_f32 }, p.line);
w.fg_stroke = egui::Stroke::new(1_f32, p.text);
}
ctx.set_visuals(v);
ctx.data_mut(|data| data.insert_temp(applied, choice));
}
fn sotv_palette(colors: [u32; 8], light: bool) -> Palette {
let [bg, panel, field, layer, text, subtle, accent, line] =
colors.map(|hex| Color32::from_rgb((hex >> 16) as u8, (hex >> 8) as u8, hex as u8));
@ -350,3 +385,19 @@ fn sotv_palette(colors: [u32; 8], light: bool) -> Palette {
pattern: [layer, panel],
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn repeated_theme_application_keeps_the_existing_style() {
let ctx = egui::Context::default();
Theme::Midra.apply(&ctx);
let first = ctx.global_style();
Theme::Midra.apply(&ctx);
assert!(std::sync::Arc::ptr_eq(&first, &ctx.global_style()));
Theme::CorporateLight.apply(&ctx);
assert!(!std::sync::Arc::ptr_eq(&first, &ctx.global_style()));
}
}

View File

@ -3,6 +3,8 @@ use egui::{Color32, Pos2, Rect, Stroke, Vec2};
use serde::{Deserialize, Serialize};
pub const MAX_MARKS: usize = 64;
pub const MIN_TOOL_SIZE: f32 = 4.;
pub const MAX_TOOL_SIZE: f32 = 48.;
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
pub enum Tool {
@ -43,7 +45,7 @@ pub struct Overlay {
impl Overlay {
pub fn normalized(mut self) -> Self {
self.pointer = self.pointer.and_then(normalized_point);
self.pointer_size = finite_clamp(self.pointer_size, 4., 48., 12.);
self.pointer_size = finite_clamp(self.pointer_size, MIN_TOOL_SIZE, MAX_TOOL_SIZE, 12.);
self.marks.truncate(MAX_MARKS);
self.marks.retain_mut(|mark| {
let Some(from) = normalized_point(mark.from) else {
@ -54,7 +56,7 @@ impl Overlay {
};
mark.from = from;
mark.to = to;
mark.width = finite_clamp(mark.width, 2., 48., 8.);
mark.width = finite_clamp(mark.width, 2., MAX_TOOL_SIZE, 8.);
true
});
self
@ -188,6 +190,18 @@ fn page_to_screen(target: Rect, uv: Rect, point: [f32; 2]) -> Option<Pos2> {
}
pub fn paint(painter: &egui::Painter, target: Rect, uv: Rect, overlay: &Overlay) {
paint_scaled(painter, target, uv, overlay, 1.);
}
/// Scale fixed-width marks so a smaller Presenter preview resembles the Slides view.
pub fn paint_scaled(
painter: &egui::Painter,
target: Rect,
uv: Rect,
overlay: &Overlay,
scale: f32,
) {
let scale = finite_clamp(scale, 0.05, 4., 1.);
for mark in overlay.marks.iter().take(MAX_MARKS) {
let (Some(from), Some(to)) = (
page_to_screen(target, uv, mark.from),
@ -201,9 +215,9 @@ pub fn paint(painter: &egui::Painter, target: Rect, uv: Rect, overlay: &Overlay)
Color32::from_rgba_unmultiplied(mark.color[0], mark.color[1], mark.color[2], 105)
}
};
let width = mark.width;
let width = mark.width * scale;
if mark.kind == MarkKind::Arrow
&& let Some((shaft_end, head)) = arrow_geometry(from, to, width)
&& let Some((shaft_end, head)) = arrow_geometry(from, to, mark.width, scale)
{
painter.line_segment([from, shaft_end], Stroke::new(width, color));
painter.add(egui::Shape::convex_polygon(
@ -224,26 +238,38 @@ pub fn paint(painter: &egui::Painter, target: Rect, uv: Rect, overlay: &Overlay)
overlay.pointer_color[1],
overlay.pointer_color[2],
);
painter.circle_filled(point, overlay.pointer_size, color);
painter.circle_filled(point, overlay.pointer_size * scale, color);
painter.circle_stroke(
point,
overlay.pointer_size + 2.,
Stroke::new(2_f32, Color32::WHITE),
(overlay.pointer_size + 2.) * scale,
Stroke::new(2. * scale, Color32::WHITE),
);
}
}
/// Make a tool size occupy the same share of the slide at every output resolution.
/// egui points account for monitor DPI, so 1080 logical points is also the correct
/// baseline for a 4K screen using 200% display scaling.
pub fn slide_paint_scale(target: Rect) -> f32 {
finite_clamp(target.height() / 1080., 0.05, 4., 1.)
}
/// A filled head avoids the three overlapping thick strokes that deform large arrows.
fn arrow_geometry(from: Pos2, to: Pos2, width: f32) -> Option<(Pos2, [Pos2; 3])> {
fn arrow_geometry(from: Pos2, to: Pos2, width: f32, scale: f32) -> Option<(Pos2, [Pos2; 3])> {
let vector = to - from;
let distance = vector.length();
if distance <= 2. {
if distance <= 2. * scale {
return None;
}
let direction = vector / distance;
let normal = Vec2::new(-direction.y, direction.x);
let head_length = (width * 1.8).clamp(10., 56.).min(distance * 0.45);
let head_half_width = (width * 0.9).clamp(6., 30.).min(head_length * 0.75);
let width = width * scale;
let head_length = (width * 1.8)
.clamp(10. * scale, 56. * scale)
.min(distance * 0.45);
let head_half_width = (width * 0.9)
.clamp(6. * scale, 30. * scale)
.min(head_length * 0.75);
let base = to - direction * head_length;
let shaft_end = base + direction * (width * 0.12).min(head_length * 0.12);
Some((
@ -264,13 +290,29 @@ mod tests {
fn large_arrow_has_a_bounded_filled_head_and_shortened_shaft() {
let from = Pos2::new(0., 0.);
let to = Pos2::new(0., 200.);
let (shaft_end, head) = arrow_geometry(from, to, 48.).unwrap();
let (shaft_end, head) = arrow_geometry(from, to, 48., 1.).unwrap();
assert!(shaft_end.y < to.y);
assert_eq!(head[0], to);
assert!(head[1].distance(head[2]) <= 60.);
assert!(to.distance(head[1]) < 70.);
let (_, short_head) = arrow_geometry(from, Pos2::new(20., 0.), 48.).unwrap();
let (_, short_head) = arrow_geometry(from, Pos2::new(20., 0.), 48., 1.).unwrap();
assert!(short_head[0].distance(short_head[1]) < 15.);
}
#[test]
fn screen_scale_keeps_tools_and_arrow_heads_proportional() {
let hd = Rect::from_min_size(Pos2::ZERO, Vec2::new(1920., 1080.));
let uhd = Rect::from_min_size(Pos2::ZERO, Vec2::new(3840., 2160.));
let preview = Rect::from_min_size(Pos2::ZERO, Vec2::new(480., 270.));
assert_eq!(slide_paint_scale(hd), 1.);
assert_eq!(slide_paint_scale(uhd), 2.);
assert_eq!(slide_paint_scale(preview), 0.25);
assert_eq!(MAX_TOOL_SIZE * slide_paint_scale(hd), 48.);
assert_eq!(MAX_TOOL_SIZE * slide_paint_scale(uhd), 96.);
let (_, full) = arrow_geometry(Pos2::ZERO, Pos2::new(400., 0.), 32., 1.).unwrap();
let (_, small) = arrow_geometry(Pos2::ZERO, Pos2::new(100., 0.), 32., 0.25).unwrap();
assert!((full[1].distance(full[2]) * 0.25 - small[1].distance(small[2])).abs() < 0.01);
}
}

View File

@ -105,39 +105,39 @@ pub fn register_pdf_association() -> Result<(), String> {
let command = open_command(&executable);
let values = [
(
r"Software\Classes\PDFPresenter.Document",
r"Software\Classes\Deckstride.Document",
None,
"PDF Presenter document",
"Deckstride document",
),
(
r"Software\Classes\PDFPresenter.Document\DefaultIcon",
r"Software\Classes\Deckstride.Document\DefaultIcon",
None,
icon.as_str(),
),
(
r"Software\Classes\PDFPresenter.Document\shell\open\command",
r"Software\Classes\Deckstride.Document\shell\open\command",
None,
command.as_str(),
),
(
r"Software\PDF Presenter\Capabilities",
r"Software\Deckstride\Capabilities",
Some("ApplicationName"),
"PDF Presenter",
"Deckstride",
),
(
r"Software\PDF Presenter\Capabilities",
r"Software\Deckstride\Capabilities",
Some("ApplicationDescription"),
"Fast multi-screen PDF presenter",
),
(
r"Software\PDF Presenter\Capabilities\FileAssociations",
r"Software\Deckstride\Capabilities\FileAssociations",
Some(".pdf"),
"PDFPresenter.Document",
"Deckstride.Document",
),
(
r"Software\RegisteredApplications",
Some("PDF Presenter"),
r"Software\PDF Presenter\Capabilities",
Some("Deckstride"),
r"Software\Deckstride\Capabilities",
),
];
for (subkey, name, value) in values {
@ -174,8 +174,8 @@ mod tests {
#[test]
fn association_command_quotes_executable_and_document() {
assert_eq!(
open_command(Path::new(r"C:\Portable Apps\pdf-presenter.exe")),
r#"\"C:\Portable Apps\pdf-presenter.exe\" --open \"%1\""#
open_command(Path::new(r"C:\Portable Apps\deckstride.exe")),
r#"\"C:\Portable Apps\deckstride.exe\" --open \"%1\""#
);
}
}

View File

@ -56,6 +56,10 @@ pub enum Request {
PickNotes {
owner: Option<isize>,
},
PickPack {
language: bool,
owner: Option<isize>,
},
PrepareNotes {
path: PathBuf,
cache: PathBuf,
@ -277,6 +281,23 @@ pub fn run() -> Result<(), String> {
.add_filter("Notes (TXT, Markdown)", &["txt", "md"])
.pick_file();
}
Request::PickPack { language, owner } => {
reply.picked = picker_dialog(owner)?
.set_title(if language {
"Import language pack"
} else {
"Import theme pack"
})
.add_filter(
if language {
"Language pack"
} else {
"Theme pack"
},
&["zip"],
)
.pick_file();
}
Request::PrepareNotes {
path,
cache,

View File

@ -1,5 +1,5 @@
mod common;
use pdf_presenter::{
use deckstride::{
blank,
studio::{Action, Studio},
};
@ -50,7 +50,7 @@ fn worker_import_failure_and_clear_preserve_blank_state() {
let dir = tempfile::tempdir().unwrap();
let source = dir.path().join("picture.png");
common::image(&source, [20, 50, 90, 255]);
let mut s = Studio::with_program(true, None, env!("CARGO_BIN_EXE_pdf-presenter").into());
let mut s = Studio::with_program(true, None, env!("CARGO_BIN_EXE_deckstride").into());
until(&mut s, |s| s.initialized);
s.blanked = true;
s.execute(Action::SetBlankPicture(source.clone()));
@ -63,9 +63,9 @@ fn worker_import_failure_and_clear_preserve_blank_state() {
assert_eq!(s.blank_picture.as_ref().unwrap().info.sha256, hash);
assert!(s.blanked);
let encoded = toml::to_string(&s.settings).unwrap();
let decoded: pdf_presenter::settings::Settings = toml::from_str(&encoded).unwrap();
let decoded: deckstride::settings::Settings = toml::from_str(&encoded).unwrap();
assert!(decoded.blank_picture);
s.execute(Action::ClearBlankPicture);
assert!(s.blanked && s.blank_picture.is_none() && !s.settings.blank_picture);
assert!(!pdf_presenter::settings::Settings::default().blank_picture);
assert!(!deckstride::settings::Settings::default().blank_picture);
}

View File

@ -1,6 +1,6 @@
#[test]
fn executable_identifies_its_actual_status() {
let output = std::process::Command::new(env!("CARGO_BIN_EXE_pdf-presenter"))
let output = std::process::Command::new(env!("CARGO_BIN_EXE_deckstride"))
.arg("--help")
.output()
.unwrap();

View File

@ -1,5 +1,5 @@
mod common;
use pdf_presenter::{
use deckstride::{
cache::{self, Policy},
document::Document,
settings,
@ -142,7 +142,7 @@ fn manual_worker_cleanup_preserves_live_document_and_regenerates_after_expunging
let root = temp.path().join("cache");
let doc = Document::open(&images, root.clone()).unwrap();
let frame = doc.render(0, 512).unwrap();
let mut studio = Studio::with_program(true, None, env!("CARGO_BIN_EXE_pdf-presenter").into());
let mut studio = Studio::with_program(true, None, env!("CARGO_BIN_EXE_deckstride").into());
studio.cache_path = root.clone();
studio.initialized = true;
let clean = |s: &mut Studio| {
@ -175,7 +175,7 @@ fn startup_cleanup_runs_once_and_manual_errors_are_reported() {
let root = temp.path().join("cache");
let expired = entry(&root, 1, 0, 30, 40);
let fresh = entry(&root, 1, 1, 30, 0);
let mut s = Studio::with_program(true, None, env!("CARGO_BIN_EXE_pdf-presenter").into());
let mut s = Studio::with_program(true, None, env!("CARGO_BIN_EXE_deckstride").into());
s.cache_path = root;
s.initialized = true;
let deadline = Instant::now() + Duration::from_secs(10);
@ -218,11 +218,7 @@ fn startup_cleanup_waits_for_initial_deck_preparation() {
}
let root = temp.path().join("cache");
let expired = entry(&root, 1, 0, 30, 40);
let mut s = Studio::with_program(
true,
Some(images),
env!("CARGO_BIN_EXE_pdf-presenter").into(),
);
let mut s = Studio::with_program(true, Some(images), env!("CARGO_BIN_EXE_deckstride").into());
s.cache_path = root;
s.poll();
assert!(!s.cache_busy, "Initial open must precede cleanup");

View File

@ -1,11 +1,11 @@
use pdf_presenter::{
use deckstride::{
studio::{Action, Studio},
worker::{Completion, Job, Reply, Request, ResultPacket},
};
use std::sync::mpsc::{self, Receiver, SyncSender};
fn controlled_chooser() -> (Studio, Receiver<Job>, SyncSender<Completion>) {
let mut studio = Studio::with_program(true, None, env!("CARGO_BIN_EXE_pdf-presenter").into());
let mut studio = Studio::with_program(true, None, env!("CARGO_BIN_EXE_deckstride").into());
let (requests, jobs) = mpsc::sync_channel(4);
let (results, replies) = mpsc::sync_channel(4);
// Replace only the chooser transport: no native dialog or renderer is opened.

View File

@ -1,5 +1,5 @@
mod common;
use pdf_presenter::{
use deckstride::{
document::{Document, natural_cmp, read_frame, validate_frame},
settings,
};

View File

@ -5,7 +5,7 @@ use std::{
};
fn run_native(args: &[&str]) -> Output {
let mut child = Command::new(env!("CARGO_BIN_EXE_pdf-presenter"))
let mut child = Command::new(env!("CARGO_BIN_EXE_deckstride"))
.args(args)
.stdin(Stdio::null())
.stdout(Stdio::piped())
@ -31,10 +31,8 @@ fn run_native(args: &[&str]) -> Output {
#[test]
fn native_windows_smoke_when_requested() {
if std::env::var_os("PDF_PRESENTER_GUI_TESTS").is_none() {
eprintln!(
"Native smoke not requested; set PDF_PRESENTER_GUI_TESTS=1 with a display server."
);
if std::env::var_os("DECKSTRIDE_GUI_TESTS").is_none() {
eprintln!("Native smoke not requested; set DECKSTRIDE_GUI_TESTS=1 with a display server.");
return;
}
let listed = run_native(&["--list-monitors"]);
@ -65,7 +63,7 @@ fn native_windows_smoke_when_requested() {
#[test]
fn invalid_cli_fails_cleanly() {
let result = Command::new(env!("CARGO_BIN_EXE_pdf-presenter"))
let result = Command::new(env!("CARGO_BIN_EXE_deckstride"))
.arg("--bad-option")
.output()
.unwrap();
@ -75,10 +73,10 @@ fn invalid_cli_fails_cleanly() {
#[test]
fn independent_output_acknowledges_frames_and_blanking() {
if std::env::var_os("PDF_PRESENTER_GUI_TESTS").is_none() {
if std::env::var_os("DECKSTRIDE_GUI_TESTS").is_none() {
return;
}
use pdf_presenter::{
use deckstride::{
document::Document,
output::{Ack, HostState},
worker::{read_json, write_json},
@ -109,7 +107,7 @@ fn independent_output_acknowledges_frames_and_blanking() {
}
let doc = Document::open(temp.path(), temp.path().join("cache")).unwrap();
let frames: Vec<_> = (0..8).map(|page| doc.render(page, 320).unwrap()).collect();
let blank_picture = pdf_presenter::blank::prepare(
let blank_picture = deckstride::blank::prepare(
Some(&temp.path().join("slide0.png")),
&temp.path().join("blank-picture.rgba"),
)
@ -122,7 +120,7 @@ fn independent_output_acknowledges_frames_and_blanking() {
}
}
let mut child = ChildGuard(
Command::new(env!("CARGO_BIN_EXE_pdf-presenter"))
Command::new(env!("CARGO_BIN_EXE_deckstride"))
.arg("--presentation-host")
.stdin(Stdio::piped())
.stdout(Stdio::piped())
@ -209,9 +207,9 @@ fn independent_output_acknowledges_frames_and_blanking() {
write_json(
&mut input,
&HostState {
zoom: pdf_presenter::zoom::Sync {
zoom: deckstride::zoom::Sync {
enabled: true,
view: pdf_presenter::zoom::View {
view: deckstride::zoom::View {
scale: 2.,
center: [0.5; 2],
},
@ -250,9 +248,9 @@ fn independent_output_acknowledges_frames_and_blanking() {
zoom_only: true,
generation: 99,
page,
zoom: pdf_presenter::zoom::Sync {
zoom: deckstride::zoom::Sync {
enabled: true,
view: pdf_presenter::zoom::View {
view: deckstride::zoom::View {
scale: 4.,
center: [0.4, 0.6],
},
@ -297,10 +295,10 @@ fn independent_output_acknowledges_frames_and_blanking() {
#[cfg(target_os = "linux")]
#[test]
fn orphaned_output_holds_until_closed_then_exits_on_close_or_escape() {
if std::env::var_os("PDF_PRESENTER_GUI_TESTS").is_none() {
if std::env::var_os("DECKSTRIDE_GUI_TESTS").is_none() {
return;
}
use pdf_presenter::{output::HostState, worker::write_json};
use deckstride::{output::HostState, worker::write_json};
use x11_dl::xlib;
let x = xlib::Xlib::open().unwrap();
// A private X11 connection is used only by this test thread.
@ -424,7 +422,7 @@ fn orphaned_output_holds_until_closed_then_exits_on_close_or_escape() {
}
}
let mut child = ChildGuard(
Command::new(env!("CARGO_BIN_EXE_pdf-presenter"))
Command::new(env!("CARGO_BIN_EXE_deckstride"))
.env("WINIT_UNIX_BACKEND", "x11")
.arg("--presentation-host")
.stdin(Stdio::piped())
@ -535,13 +533,13 @@ fn orphaned_output_holds_until_closed_then_exits_on_close_or_escape() {
#[cfg(target_os = "linux")]
#[test]
fn wayland_browser_parents_to_presenter_before_first_buffer() {
if std::env::var_os("PDF_PRESENTER_GUI_TESTS").is_none()
if std::env::var_os("DECKSTRIDE_GUI_TESTS").is_none()
|| std::env::var_os("WAYLAND_DISPLAY").is_none()
{
return;
}
let trace = tempfile::NamedTempFile::new().unwrap();
let mut child = Command::new(env!("CARGO_BIN_EXE_pdf-presenter"))
let mut child = Command::new(env!("CARGO_BIN_EXE_deckstride"))
.arg("--smoke-test")
.env("WAYLAND_DEBUG", "client")
.stdout(Stdio::null())
@ -577,8 +575,8 @@ fn wayland_browser_parents_to_presenter_before_first_buffer() {
.next()
.unwrap()
};
let presenter = top("PDF Presenter — Presenter");
let browser = top("PDF Presenter — All slides");
let presenter = top("Deckstride — Presenter");
let browser = top("Deckstride — All slides");
assert_ne!(browser, presenter);
let parent_at = log
.find(&format!("{browser}.set_parent({presenter})"))
@ -621,7 +619,7 @@ fn wayland_browser_parents_to_presenter_before_first_buffer() {
fn unsupported_sleep_backend_reports_unavailable_and_exits_on_parent_eof() {
let output = run_native(&["--keep-awake"]);
assert!(output.status.success());
let status: String = pdf_presenter::worker::read_json(&mut output.stdout.as_slice()).unwrap();
let status: String = deckstride::worker::read_json(&mut output.stdout.as_slice()).unwrap();
assert!(status.starts_with("Sleep protection unavailable:"));
assert!(status.contains(std::env::consts::OS));
}
@ -629,8 +627,8 @@ fn unsupported_sleep_backend_reports_unavailable_and_exits_on_parent_eof() {
#[test]
fn keep_awake_status_uses_private_length_prefixed_json() {
let mut framed = Vec::new();
pdf_presenter::worker::write_json(&mut framed, &"Sleep protection test").unwrap();
deckstride::worker::write_json(&mut framed, &"Sleep protection test").unwrap();
assert!(serde_json::from_slice::<String>(&framed).is_err());
let decoded: String = pdf_presenter::worker::read_json(&mut framed.as_slice()).unwrap();
let decoded: String = deckstride::worker::read_json(&mut framed.as_slice()).unwrap();
assert_eq!(decoded, "Sleep protection test");
}

View File

@ -1,5 +1,5 @@
mod common;
use pdf_presenter::{
use deckstride::{
document::Document,
notes,
studio::{Action, Studio},
@ -195,7 +195,7 @@ fn editor_worker_saves_captured_page_and_keeps_draft_after_conflict() {
common::pdf(&source);
let cache = temp.path().join("cache");
let info = Document::open(&source, cache.clone()).unwrap().info;
let mut s = Studio::with_program(true, None, env!("CARGO_BIN_EXE_pdf-presenter").into());
let mut s = Studio::with_program(true, None, env!("CARGO_BIN_EXE_deckstride").into());
s.cache_path = cache;
s.deck = Some(info);
s.initialized = true;
@ -393,7 +393,7 @@ fn worker_import_review_save_and_failure_keep_presentation_running() {
let info = Document::open(&source, cache.clone()).unwrap().info;
let input = temp.path().join("notes.txt");
std::fs::write(&input, "Imported").unwrap();
let mut s = Studio::with_program(true, None, env!("CARGO_BIN_EXE_pdf-presenter").into());
let mut s = Studio::with_program(true, None, env!("CARGO_BIN_EXE_deckstride").into());
s.cache_path = cache;
s.initialized = true;
s.execute(Action::ImportNotes(input.clone()));

View File

@ -1,4 +1,4 @@
use pdf_presenter::{
use deckstride::{
paint,
poc::{Action, Display, Model, Options, SLIDES, window_rect},
};

View File

@ -1,5 +1,5 @@
mod common;
use pdf_presenter::studio::{Action, Monitor, Studio};
use deckstride::studio::{Action, Monitor, Studio};
use std::{
path::{Path, PathBuf},
time::{Duration, Instant},
@ -8,7 +8,7 @@ fn studio(path: &Path, cache: &Path) -> Studio {
let mut s = Studio::with_program(
true,
Some(path.to_owned()),
env!("CARGO_BIN_EXE_pdf-presenter").into(),
env!("CARGO_BIN_EXE_deckstride").into(),
);
s.cache_path = cache.to_owned();
s.set_monitors(
@ -273,11 +273,10 @@ fn rolling_buffer_finishes_processing_and_reloads_evicted_slides_without_churn()
}
#[test]
#[ignore = "manual stress test: set PDF_PRESENTER_STRESS_PDF to an authorized local PDF"]
#[ignore = "manual stress test: set DECKSTRIDE_STRESS_PDF to an authorized local PDF"]
fn real_pdf_exceeds_budget_and_keeps_navigating() {
let path = PathBuf::from(
std::env::var_os("PDF_PRESENTER_STRESS_PDF").expect("PDF_PRESENTER_STRESS_PDF"),
);
let path =
PathBuf::from(std::env::var_os("DECKSTRIDE_STRESS_PDF").expect("DECKSTRIDE_STRESS_PDF"));
let temp = tempfile::tempdir().unwrap();
let mut s = studio(&path, &temp.path().join("cache"));
s.monitors[0].size = (1920, 1080);

View File

@ -1,4 +1,4 @@
use pdf_presenter::Presentation;
use deckstride::Presentation;
use std::num::NonZeroUsize;
#[test]

View File

@ -1,4 +1,19 @@
use pdf_presenter::settings::{self, Layout, Routes, Settings};
use deckstride::settings::{self, Layout, Routes, Settings};
#[test]
fn every_interface_language_round_trips_through_settings_v1() {
let temp = tempfile::tempdir().unwrap();
for language in deckstride::localization::Language::ALL {
let path = temp.path().join(format!("{language:?}.toml"));
let settings = Settings {
language,
..Default::default()
};
settings::write(&path, &settings).unwrap();
assert_eq!(settings::read(&path).unwrap().language, language);
}
}
#[test]
fn settings_roundtrip_preserves_project_overrides_and_hidden_bars() {
let temp = tempfile::tempdir().unwrap();
@ -8,8 +23,10 @@ fn settings_roundtrip_preserves_project_overrides_and_hidden_bars() {
settings.layout.notes.size = 42.;
settings.buffer_mib = 2048;
settings.auto_show = false;
settings.theme = pdf_presenter::theme::Theme::CorporateLight;
settings.language = pdf_presenter::localization::Language::Fr;
settings.theme = deckstride::theme::Theme::CorporateLight;
settings.theme_pack = Some("example-theme/night".into());
settings.language = deckstride::localization::Language::Fr;
settings.language_pack = Some("eo-example".into());
let mut project = Layout::default();
project.previous.show = true; // Explicit opt-in survives saving and loading.
project.current.show = false;
@ -31,7 +48,9 @@ fn settings_roundtrip_preserves_project_overrides_and_hidden_bars() {
assert_eq!(loaded.buffer_mib, 2048);
assert!(!loaded.auto_show);
assert_eq!(loaded.theme, settings.theme);
assert_eq!(loaded.theme_pack, settings.theme_pack);
assert_eq!(loaded.language, settings.language);
assert_eq!(loaded.language_pack, settings.language_pack);
let bytes = std::fs::read(&path).unwrap();
settings.version = 2;
assert!(settings::write(&path, &settings).is_err());
@ -144,11 +163,11 @@ fn slide_colors_migrate_roundtrip_and_reject_invalid_channels() {
};
settings::write(&path, &s).unwrap();
assert_eq!(settings::read(&path).unwrap().slide_colors, s.slide_colors);
let state = pdf_presenter::output::HostState {
let state = deckstride::output::HostState {
slide_colors: s.slide_colors,
..Default::default()
};
let restored: pdf_presenter::output::HostState =
let restored: deckstride::output::HostState =
serde_json::from_slice(&serde_json::to_vec(&state).unwrap()).unwrap();
assert_eq!(restored.slide_colors, s.slide_colors);
for value in [
@ -303,3 +322,111 @@ fn display_layout_profiles_roundtrip_migrate_and_validate() {
.collect();
assert!(bad.validate().is_err());
}
#[test]
fn screen_modes_migrate_validate_and_roundtrip() {
use settings::ScreenMode::{AlwaysFullscreen, AlwaysWindowed, FollowGlobal};
let old: Settings = toml::from_str("version = 1").unwrap();
assert!(old.screen_modes.is_empty());
for global in [false, true] {
assert_eq!(FollowGlobal.fullscreen(global), global);
assert!(AlwaysFullscreen.fullscreen(global));
assert!(!AlwaysWindowed.fullscreen(global));
}
let mut s = old;
s.screen_modes = [
("one".into(), AlwaysFullscreen),
("two".into(), AlwaysWindowed),
("three".into(), FollowGlobal),
]
.into();
let temp = tempfile::tempdir().unwrap();
let path = temp.path().join("settings.toml");
settings::write(&path, &s).unwrap();
assert_eq!(settings::read(&path).unwrap().screen_modes, s.screen_modes);
assert!(toml::from_str::<Settings>("[screen_modes]\none = 'invalid'").is_err());
for id in [String::new(), "a".repeat(1025)] {
s.screen_modes.insert(id.clone(), AlwaysWindowed);
assert!(s.validate().is_err());
s.screen_modes.remove(&id);
}
s.screen_modes = (0..129)
.map(|i| (i.to_string(), AlwaysFullscreen))
.collect();
assert!(s.validate().is_err());
s.screen_modes.remove("128");
assert!(s.validate().is_ok());
}
#[test]
fn autoplay_settings_migrate_validate_and_round_trip() {
let legacy: Settings = toml::from_str("version = 1").unwrap();
assert!(!legacy.autoplay_enabled);
assert_eq!(legacy.autoplay_seconds, 5.0);
assert!(!legacy.autoplay_loop);
let mut settings = legacy;
settings.autoplay_enabled = true;
settings.autoplay_seconds = 12.5;
settings.autoplay_loop = true;
let temp = tempfile::tempdir().unwrap();
let path = temp.path().join("settings.toml");
settings::write(&path, &settings).unwrap();
let loaded = settings::read(&path).unwrap();
assert!(loaded.autoplay_enabled);
assert_eq!(loaded.autoplay_seconds, 12.5);
assert!(loaded.autoplay_loop);
for invalid in [0.0, 0.24, 3600.01, f32::INFINITY, f32::NAN] {
let mut invalid_settings = loaded.clone();
invalid_settings.autoplay_seconds = invalid;
assert!(invalid_settings.validate().is_err());
}
}
#[test]
fn output_screen_modes_roundtrip_and_fall_back_to_global() {
use deckstride::output::HostState;
let state = HostState {
fullscreen: true,
screen_fullscreen: [("one".into(), false), ("two".into(), true)].into(),
..Default::default()
};
let loaded: HostState = serde_json::from_slice(&serde_json::to_vec(&state).unwrap()).unwrap();
assert!(!loaded.fullscreen_on("one"));
assert!(loaded.fullscreen_on("two"));
assert!(loaded.fullscreen_on("unknown"));
let mut legacy = serde_json::to_value(state).unwrap();
legacy.as_object_mut().unwrap().remove("screen_fullscreen");
assert!(
serde_json::from_value::<HostState>(legacy)
.unwrap()
.fullscreen_on("one")
);
}
#[test]
fn single_screen_preferences_are_additive_bounded_and_roundtrip() {
let old: Settings = toml::from_str("version = 1").unwrap();
assert!(old.single_screens.is_empty());
let mut s = old;
s.single_screens = vec!["one".into(), "disconnected#1".into()];
let temp = tempfile::tempdir().unwrap();
let path = temp.path().join("settings.toml");
settings::write(&path, &s).unwrap();
assert_eq!(
settings::read(&path).unwrap().single_screens,
s.single_screens
);
for ids in [
vec!["".into()],
vec!["a".repeat(1025)],
vec!["one".into(), "one".into()],
(0..33).map(|i| i.to_string()).collect(),
] {
s.single_screens = ids;
assert!(s.validate().is_err());
}
s.single_screens = (0..32).map(|i| i.to_string()).collect();
assert!(s.validate().is_ok());
}

View File

@ -1,7 +1,7 @@
mod common;
use deckstride::{document::Document, presenter_ui::paint_slide, settings::SlideColors};
use egui::{Context, Pos2, RawInput, Rect, TextureOptions, Vec2};
use egui_software_backend::{BufferMutRef, ColorFieldOrder, EguiSoftwareRender};
use pdf_presenter::{document::Document, presenter_ui::paint_slide, settings::SlideColors};
#[test]
fn transparent_pdf_composites_on_white_or_custom_page_with_independent_padding() {

View File

@ -1,4 +1,4 @@
use pdf_presenter::timer::Timer;
use deckstride::timer::Timer;
use std::time::{Duration, Instant};
#[test]

View File

@ -1,8 +1,8 @@
use egui::{Pos2, Rect, Vec2};
use pdf_presenter::{
use deckstride::{
output::{HostState, coalesce},
tools::{MAX_MARKS, Mark, MarkKind, Overlay, Toolbox, screen_to_page},
};
use egui::{Pos2, Rect, Vec2};
#[test]
fn overlay_input_is_bounded_and_normalized() {
@ -33,7 +33,7 @@ fn overlay_input_is_bounded_and_normalized() {
#[test]
fn toolbox_discards_oldest_mark_and_maps_visible_crop() {
let mut tools = Toolbox::default();
tools.select(pdf_presenter::tools::Tool::Arrow);
tools.select(deckstride::tools::Tool::Arrow);
for index in 0..MAX_MARKS + 1 {
assert!(tools.begin_mark([index as f32 / 100., 0.5]));
tools.end_mark();
@ -89,7 +89,7 @@ fn overlay_update_coalesces_without_losing_full_output_state() {
generation: 9,
page: 3,
zoom_only: true,
zoom: pdf_presenter::zoom::Sync {
zoom: deckstride::zoom::Sync {
enabled: true,
..Default::default()
},

View File

@ -1,5 +1,5 @@
mod common;
use pdf_presenter::worker::{Reply, Request, read_json, write_json};
use deckstride::worker::{Reply, Request, read_json, write_json};
use std::{
io::Read,
process::{Command, Stdio},
@ -10,7 +10,7 @@ fn worker_protocol_loads_renders_and_keeps_previous_document_after_failure() {
let path = temp.path().join("sample.pdf");
common::pdf(&path);
let cache = temp.path().join("cache");
let mut child = Command::new(env!("CARGO_BIN_EXE_pdf-presenter"))
let mut child = Command::new(env!("CARGO_BIN_EXE_deckstride"))
.arg("--worker")
.stdin(Stdio::piped())
.stdout(Stdio::piped())
@ -79,9 +79,9 @@ fn protocol_rejects_oversized_and_malformed_messages() {
#[test]
fn supervisor_kills_a_stuck_worker_and_recovers() {
use std::time::{Duration, Instant};
let bridge = pdf_presenter::worker::Bridge::with_program(
let bridge = deckstride::worker::Bridge::with_program(
Duration::from_millis(300),
env!("CARGO_BIN_EXE_pdf-presenter").into(),
env!("CARGO_BIN_EXE_deckstride").into(),
);
let start = Instant::now();
assert!(bridge.submit(7, 1, Request::SleepTest(5000)));
@ -97,7 +97,7 @@ fn supervisor_kills_a_stuck_worker_and_recovers() {
#[test]
fn output_diagnostics_are_distinct_from_explicit_blanking() {
use pdf_presenter::output::Ack;
use deckstride::output::Ack;
let old: Ack =
serde_json::from_str(r#"{"sequence":0,"page":null,"status":"host restarted","awake":""}"#)
.unwrap();

View File

@ -1,10 +1,10 @@
use egui::{Context, Pos2, RawInput, Rect, TextureOptions, Vec2};
use egui_software_backend::{BufferMutRef, ColorFieldOrder, EguiSoftwareRender};
use pdf_presenter::{
use deckstride::{
output::{HostState, coalesce},
settings::Settings,
zoom::{PerformanceWatch, Sync, View},
};
use egui::{Context, Pos2, RawInput, Rect, TextureOptions, Vec2};
use egui_software_backend::{BufferMutRef, ColorFieldOrder, EguiSoftwareRender};
use std::time::{Duration, Instant};
#[test]
fn crop_anchor_pan_and_limits() {
@ -153,7 +153,7 @@ fn zoom_paints_existing_texture_crop_with_constant_geometry_and_no_new_uploads()
..Default::default()
},
|ui| {
pdf_presenter::presenter_ui::paint_slide_zoomed(
deckstride::presenter_ui::paint_slide_zoomed(
ui.painter(),
rect,
texture.id(),
@ -225,7 +225,7 @@ fn buffered_zoom_drawing_measurement() {
..Default::default()
},
|ui| {
pdf_presenter::presenter_ui::paint_slide_adapted(
deckstride::presenter_ui::paint_slide_adapted(
ui.painter(),
rect,
texture.id(),
@ -276,7 +276,7 @@ fn wheel_drag_and_double_click_operate_in_slide_coordinates() {
..Default::default()
},
|ui| {
view = pdf_presenter::presenter_ui::zoom_gestures(ui, target, view).0;
view = deckstride::presenter_ui::zoom_gestures(ui, target, view).0;
},
);
view
@ -358,7 +358,7 @@ fn optimized_crop_matches_general_renderer_with_alpha_clipping_and_dpi() {
},
|ui| {
let painter = ui.painter().with_clip_rect(rect.shrink(20.));
pdf_presenter::presenter_ui::paint_slide_zoomed(
deckstride::presenter_ui::paint_slide_zoomed(
&painter,
rect,
texture.id(),
@ -415,7 +415,7 @@ fn parallel_crop_bands_have_no_seams_at_fractional_boundaries() {
..Default::default()
},
|ui| {
pdf_presenter::presenter_ui::paint_slide_zoomed(
deckstride::presenter_ui::paint_slide_zoomed(
ui.painter(),
rect,
texture.id(),
@ -450,7 +450,7 @@ fn parallel_crop_bands_have_no_seams_at_fractional_boundaries() {
#[test]
fn portrait_zoom_fills_screen_without_stretching_or_out_of_bounds_pixels() {
use pdf_presenter::presenter_ui::zoom_geometry;
use deckstride::presenter_ui::zoom_geometry;
for size in [
Vec2::new(1920., 1080.),
Vec2::new(1080., 1920.),
@ -499,7 +499,7 @@ fn adapted_portrait_pixels_fill_padding_without_uploading_another_texture() {
..Default::default()
},
|ui| {
pdf_presenter::presenter_ui::paint_slide_adapted(
deckstride::presenter_ui::paint_slide_adapted(
ui.painter(),
rect,
texture.id(),
@ -552,14 +552,9 @@ fn portrait_screen_adapting_gestures_pan_visible_area_and_reset() {
..Default::default()
},
|ui| {
view = pdf_presenter::presenter_ui::zoom_gestures_in(
ui,
target,
[210, 297],
view,
false,
)
.0;
view =
deckstride::presenter_ui::zoom_gestures_in(ui, target, [210, 297], view, false)
.0;
},
);
view
@ -604,11 +599,11 @@ fn portrait_screen_adapting_gestures_pan_visible_area_and_reset() {
#[test]
fn double_click_fits_width_near_target_then_resets_without_stretching() {
use pdf_presenter::presenter_ui::{zoom_geometry, zoom_gestures_in};
use deckstride::presenter_ui::{zoom_geometry, zoom_gestures_in};
for (dimensions, expected) in [([210, 297], 2.8285716), ([400, 100], 1.), ([10, 1000], 8.)] {
let ctx = Context::default();
let target = Rect::from_min_size(Pos2::new(40., 40.), Vec2::new(400., 200.));
let page = pdf_presenter::presenter_ui::fitted_slide(target, dimensions);
let page = deckstride::presenter_ui::fitted_slide(target, dimensions);
let click_position = Pos2::new(page.center().x, page.top() + page.height() * 0.95);
let mut view = View::default();
let mut time = 0.;
@ -666,7 +661,7 @@ fn double_click_fits_width_near_target_then_resets_without_stretching() {
#[test]
fn fit_width_uses_output_shape_even_with_a_narrow_presenter_pane() {
use pdf_presenter::presenter_ui::{fitted_slide, zoom_geometry};
use deckstride::presenter_ui::{fitted_slide, zoom_geometry};
let output = Rect::from_min_size(Pos2::ZERO, Vec2::new(1920., 1080.));
let pane = Rect::from_min_size(Pos2::ZERO, Vec2::new(300., 600.));
let preview = fitted_slide(pane, [1920, 1080]);

View File

@ -1,272 +0,0 @@
//! Interface catalog; diagnostic messages from workers remain in their original language.
use serde::{Deserialize, Serialize};
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum Language {
#[default]
System,
En,
Fr,
}
impl Language {
pub const ALL: [Self; 3] = [Self::System, Self::En, Self::Fr];
pub fn name(self) -> &'static str {
match self {
Self::System => "System / Système",
Self::En => "English",
Self::Fr => "Français",
}
}
pub fn french(self) -> bool {
match self {
Self::Fr => true,
Self::En => false,
Self::System => system_french(),
}
}
}
fn system_french() -> bool {
static FRENCH: std::sync::OnceLock<bool> = std::sync::OnceLock::new();
*FRENCH.get_or_init(|| {
sys_locale::get_locale().is_some_and(|s| s.to_ascii_lowercase().starts_with("fr"))
})
}
pub fn apply(ctx: &egui::Context, language: &Language) {
ctx.data_mut(|d| d.insert_temp(egui::Id::new("french"), language.french()));
}
pub fn tr<'a>(ctx: &egui::Context, text: &'a str) -> &'a str {
if !ctx.data(|d| d.get_temp::<bool>(egui::Id::new("french")).unwrap_or(false)) {
return text;
}
match text {
"Disk cache" => "Cache disque",
"Maximum total size (MiB)" => "Taille totale maximale (Mio)",
"Expire after (days since rendering)" => "Expiration (jours depuis le rendu)",
"Oldest files are removed first. Active decks are protected and may exceed the limit. Automatic cleanup runs once at startup, after loading and preparation finish." => {
"Les fichiers les plus anciens sont supprimés en premier. Les présentations actives sont protégées et peuvent dépasser la limite. Nettoyage automatique une fois au démarrage, après le chargement et la préparation."
}
"Expunge unused cache now" => "Purger le cache inutilisé maintenant",
"Keep fitted page area when zooming" => {
"Conserver la zone ajustée de la page pendant le zoom"
}
"By default, zoom expands the page to fill the screen without stretching. Enable this option to keep the original page-shaped area." => {
"Par défaut, le zoom agrandit la page pour remplir l’écran sans déformation. Activez cette option pour conserver la zone initiale de la page."
}
"Enable page zoom" => "Activer le zoom des diapositives",
"Page zoom" => "Zoom de la diapositive",
"Reset zoom" => "Réinitialiser le zoom",
"Disable zoom" => "Désactiver le zoom",
"Keep zoom enabled" => "Garder le zoom activé",
"Zoom performance" => "Performances du zoom",
"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." => {
"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." => {
"Le zoom réutilise les images en mémoire, sans rendu PDF ni mémoire d’image supplémentaires. Les diapositives agrandies peuvent être moins nettes. Le dessin logiciel peut ralentir sur des écrans grands ou multiples."
}
"Zoomed frames are taking over 33 ms to draw. Panning may feel slow on this display. Reset or disable zoom to return to normal viewing." => {
"Les images zoomées prennent plus de 33 ms à dessiner. Le déplacement peut sembler lent sur cet écran. Réinitialisez ou désactivez le zoom pour revenir à l’affichage normal."
}
"Cancel" => "Annuler",
"Preview (first 3 slides)" => "Aperçu (3 premières diapositives)",
"Import notes…" => "Importer des notes…",
"Import notes" => "Importer des notes",
"Processing notes…" => "Traitement des notes…",
"Slides to update" => "Diapositives à modifier",
"Sections replace notes starting at slide 1. Remaining slides keep their notes." => {
"Les sections remplacent les notes à partir de la diapositive 1. Les suivantes conservent leurs notes."
}
"Update existing notes file" => "Mettre à jour le fichier de notes existant",
"Create notes file" => "Créer le fichier de notes",
"Empty note" => "Note vide",
"Import and save notes" => "Importer et enregistrer les notes",
"File chooser already open" => "Sélecteur de fichiers déjà ouvert",
"Page background" => "Fond de page",
"Fit padding color" => "Couleur des marges",
"Page background fills transparency; fit padding fills space around the slide." => {
"Le fond de page remplit les zones transparentes ; les marges remplissent l’espace autour de la diapositive."
}
"Appearance" => "Apparence",
"Preferences" => "Préférences",
"Storage locations" => "Emplacements de stockage",
"Preparing slide…" => "Préparation de la diapositive…",
"Slide ready" => "Diapositive prête",
"Cached · loads when nearby" => "En cache · chargée à proximité",
"Queued for preparation" => "En attente de préparation",
"Could not load slide" => "Échec du chargement",
"Loading into memory…" => "Chargement en mémoire…",
"On disk · loads nearby" => "Sur disque · chargée à proximité",
"Not loaded · waiting" => "Non chargée · en attente",
"No slide" => "Aucune diapositive",
"End of slides" => "Fin des diapositives",
"Size" => "Taille",
"Tools" => "Outils",
"Off" => "Désactivé",
"Pointer" => "Pointeur",
"Arrow" => "Flèche",
"Highlighter" => "Surligneur",
"Color" => "Couleur",
"Undo" => "Annuler",
"Clear" => "Effacer",
"Pointer follows the current slide. Drag to place arrows or highlights. Up to 64 vector marks; slide images are never rerendered." => {
"Le pointeur suit la diapositive actuelle. Glissez pour placer des flèches ou des surlignages. Jusqu’à 64 tracés vectoriels ; les images ne sont jamais recalculées."
}
"Keep header visible" => "Garder l’en-tête visible",
"Keep footer visible" => "Garder le pied de page visible",
"Show both" => "Afficher les deux",
"Layout…" => "Disposition…",
"PREVIOUS" => "PRÉCÉDENTE",
"CURRENT" => "ACTUELLE",
"NEXT" => "SUIVANTE",
"PRESENTER NOTES · AUTO-FIT" => "NOTES · TAILLE AUTOMATIQUE",
"No notes for this slide" => "Aucune note pour cette diapositive",
"Header" => "En-tête",
"Above slides" => "Au-dessus des diapositives",
"Below notes" => "Sous les notes",
"Left of notes" => "À gauche des notes",
"Right of notes" => "À droite des notes",
"Left of slides" => "À gauche des diapositives",
"Right of slides" => "À droite des diapositives",
"Elapsed time position" => "Position du temps écoulé",
"Clock position" => "Position de l’horloge",
"Slide progress bar" => "Barre de progression des diapositives",
"Slide" => "Diapositive",
"Auto-hide header" => "Masquer automatiquement l’en-tête",
"Auto-hide footer" => "Masquer automatiquement le pied de page",
"Menu" => "Menu",
"Displays" => "Écrans",
"All slides" => "Toutes les diapositives",
"Layout" => "Disposition",
"Show presentation" => "Afficher la présentation",
"Blank presentation" => "Masquer la présentation",
"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",
"Balanced" => "Équilibrée",
"Slide focus" => "Diapositive seule",
"Notes first" => "Priorité aux notes",
"Hidden bars reveal near edges. Right-click to restore." => {
"Approchez des bords pour voir les barres. Clic droit pour les rétablir."
}
"Previous slide" => "Diapositive précédente",
"Current slide" => "Diapositive actuelle",
"Next slide" => "Diapositive suivante",
"Double-click to edit this slide’s notes" => {
"Double-cliquez pour modifier les notes de cette diapositive"
}
"Edit notes" => "Modifier les notes",
"Saving notes…" => "Enregistrement des notes…",
"Loading all notes and preparing sidecar…" => {
"Lecture des notes et préparation du fichier…"
}
"The file contains all slides. Save changes only this slide." => {
"Le fichier contient toutes les diapositives. Seule celle-ci sera modifiée."
}
"Note exceeds 256 KiB" => "La note dépasse 256 Kio",
"Save notes" => "Enregistrer les notes",
"Discard changes and close" => "Abandonner les modifications et fermer",
"Reload (discard edits)" => "Recharger (abandonner les modifications)",
"Retry" => "Réessayer",
"Notes" => "Notes",
"Elapsed time" => "Temps écoulé",
"Time · HH:MM" => "Heure · HH:MM",
"Save layout · This project" => "Enregistrer · Ce projet",
"Save layout · All projects" => "Enregistrer · Tous les projets",
"Use all-projects default" => "Utiliser la disposition globale",
"Project layouts override the default." => {
"La disposition du projet prime sur la disposition globale."
}
"Each screen has one role; repeat a role to mirror it." => {
"Un rôle par écran. Répétez un rôle pour le dupliquer."
}
"Unused" => "Inutilisé",
"Presenter" => "Présentateur",
"Presentation" => "Présentation",
"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",
"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."
}
"Open a PDF or picture folder to browse slides." => {
"Ouvrez un PDF ou un dossier d’images pour parcourir les diapositives."
}
"Close" => "Fermer",
"Slide preview" => "Aperçu de la diapositive",
"Preview only — presentation unchanged" => "Aperçu uniquement — présentation inchangée",
"Show on screen" => "Afficher sur l’écran",
"Fit more slides or inspect larger previews." => {
"Afficher plus de diapositives ou agrandir les aperçus."
}
"Choose where this slide browser opens." => "Choisir l’écran où s’ouvre ce navigateur.",
"Compact" => "Compact",
"Large" => "Grand",
"Safe browsing" => "Navigation sans diffusion",
"Live browsing" => "Navigation en direct",
"Click to select. Double-click to preview. Show selected to present." => {
"Cliquer pour sélectionner. Double-cliquer pour prévisualiser. Diffuser la sélection pour présenter."
}
"Changes appear immediately. Save to reuse this layout." => {
"Les modifications sont immédiates. Enregistrez pour réutiliser cette disposition."
}
"Start with a preset" => "Choisir un préréglage",
"Slides and notes" => "Diapositives et notes",
"Hide anything you do not need to give the rest more room." => {
"Masquez les éléments inutiles pour libérer de l’espace."
}
"Relative size" => "Taille relative",
"Space (%)" => "Espace (%)",
"Text size" => "Taille du texte",
"Timers and progress" => "Horloges et progression",
"Header and footer" => "En-tête et pied de page",
"Remember this layout" => "Enregistrer cette disposition",
"Preview size" => "Taille des aperçus",
"Change on click" => "Diffuser au clic",
"Presenter screen" => "Écran du présentateur",
"Show selected" => "Diffuser la sélection",
"Click changes presentation" => "Le clic change la présentation",
"Click only selects — browse safely" => "Le clic sélectionne sans diffuser",
" · CURRENT" => " · ACTUELLE",
"Open PDF…" => "Ouvrir un PDF…",
"Open picture folder…" => "Ouvrir un dossier d’images…",
"Reset timer" => "Réinitialiser le chronomètre",
"Start timer" => "Démarrer le chronomètre",
"Pause timer" => "Mettre en pause",
"Countdown" => "Compte à rebours",
"Duration" => "Durée",
"Start on first action" => "Démarrer à la première action",
"Start begins immediately. Reset waits for the next presentation action." => {
"Démarrer lance immédiatement. Réinitialiser attend la prochaine action de présentation."
}
"Running" => "En cours",
"Stopped" => "Arrêté",
"Waiting for first action" => "En attente de la première action",
"Time is up" => "Temps écoulé",
"Bar height" => "Hauteur de la barre",
"Exit fullscreen" => "Quitter le plein écran",
"Enter fullscreen" => "Passer en plein écran",
"RAM budget per process (presenter + output each use this allowance):" => {
"Budget RAM par processus (présentateur et sortie disposent chacun de ce budget) :"
}
"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"
}
"Quit" => "Quitter",
"Theme" => "Thème",
"Language" => "Langue",
_ => text,
}
}

View File

@ -2,6 +2,225 @@
## Unreleased
### 0.1.101
- Import bounded, data-only language and theme ZIP packs from Preferences. Packs use
Canvas Pilot-compatible manifests, persist beside settings, load offline at startup
and appear in the existing selectors without restarting.
- Add editable example packs, ready-to-import ZIPs and pack-format documentation.
- Publish the full five-target release with Linux x86_64, Linux ARM64, Windows x86_64,
Apple Silicon macOS and Intel macOS portable and cargo-binstall archives; see the
[release notes](development/release-notes/v0.1.101.md).
### 0.1.100
- Keep the Preferences window size stable while the pointer moves by removing a
self-referential width constraint and reserving the full footer spacing.
### 0.1.99
- Organize Preferences into General, Performance and Storage tabs. Each tab has its
own small-screen scroll position, and every Presenter remembers its selected tab.
### 0.1.98
- Shorten the Presenter menu by removing its duplicate All slides command and moving
theme, language and slide colors into the Preferences window. Keep zoom, fitted
zoom behavior, automatic Slides output and Autoplay available directly.
- Keep the menu vertically scrollable on small screens while leaving Quit visible
without scrolling at ordinary Presenter window sizes.
### 0.1.97
- Publish future release assets to both Gitea and GitHub from one reviewed build,
using a separate named token for each service.
### 0.1.96
- Rename the application, crate, executable, repository links, desktop identity,
CI publication paths and future packages to Deckstride. Existing releases remain
unchanged; valid settings migrate to the new location and warm rendered-slide
caches remain available after the rename.
- Retain the established application icon for the Deckstride release.
- Linux formatting, warnings-denied Clippy/rustdoc, workspace tests and 13 Python
helper tests pass. Windows and macOS runtime acceptance remains native testing.
### 0.1.95
- Add an Autoplay menu with persistent Play automatically, per-slide timing and
loop controls. Timing starts only once the requested slide is visible; transient
dialogs and safety states pause playback, while manual interaction restarts the
interval.
- Linux formatting, warnings-denied Clippy/rustdoc, workspace tests, build and
13 Python helper tests pass. Full GUI coverage is 83.94% against the 75% floor.
### 0.1.94
- Show the full, selectable path of the running portable executable under
**Preferences → Storage and preparation**, with guidance for finding its folder
when updating or removing the application.
- Linux formatting, warnings-denied Clippy/rustdoc, workspace tests, build and
13 Python helper tests pass. Full GUI coverage is 83.83% against the 75% floor.
### 0.1.93
- Move the open source name out of the Presenter header and into a dedicated bottom
footer row with its full canonical path. Long paths truncate to the available
width and remain available on hover; hiding the footer hides the source details.
### 0.1.92
- Extend the existing Canvas Pilot-inspired appearance menu with Spanish, Japanese,
Simplified Chinese, German and Brazilian Portuguese alongside English and French;
System follows supported native locales and safely falls back to English.
- Embed the OFL-licensed Noto Sans CJK collection for standalone Japanese and Chinese
interface rendering. Catalog lookup is compiled and allocation-free; CJK fonts are
installed only when selected and never read from disk at runtime.
- Stop rebuilding theme visuals and locale/font state on every frame. Both now update
only when their selection changes, keeping slide preparation, navigation and output
rendering paths unchanged.
- Linux formatting, warnings-denied Clippy/rustdoc, workspace tests, optimized build,
13 Python helper tests and the native-window smoke pass. Full GUI coverage is
83.89% against the 75% floor.
### 0.1.91
- Promote releases from preview status and add recurring Linux ARM64, Apple Silicon
macOS and Intel macOS artifacts alongside Linux x86_64 and Windows x86_64.
- Pin the macOS 13 cross-build environment, package portable archives for every
target, and document the expanded download and cargo-binstall choices.
- Linux formatting, warnings-denied Clippy/rustdoc, workspace tests and 13 Python
helper tests pass; full GUI coverage is 84.79% against the 75% floor.
### 0.1.90
- Correct CLI help for confirmed quitting and hold-S screen swapping. Release
validation outside the sandbox passes full GUI coverage at 84.83% (75% floor).
- Refresh bundled dependency notices and include vendored dependencies when
collecting licenses; only first-party workspace members are excluded.
- Prepare the Linux/Windows preview release containing the display controls,
quit confirmation and single-screen view added since 0.1.83. See the
[release notes](development/release-notes/v0.1.90.md).
### 0.1.89
- Add a Single screen role in Displays: full-window slides with top/bottom edge
controls, using prepared frames and preserving the ordinary Presenter layout.
Include a startup-only offer when exactly one screen is initially detected,
explaining the intended separate Presenter/Slides setup. Disconnects never
create an offer; confirmed choices persist through the existing display trial.
- Keep audience-host rendering and privacy separate; group swaps leave Single
screen assignments in place. Cover settings boundaries, startup/hotplug,
manual selection, output visibility, slide geometry and texture reuse in tests.
- Linux formatting, warnings-denied Clippy/rustdoc, workspace tests, build and
13 Python helper tests pass. GUI coverage is blocked by `XOpenDisplayFailed`;
physical edge-control, placement and latency testing remains pending.
Windows/macOS builds were not run.
### 0.1.88
- Escape and Ctrl+Q request a shared quit-confirmation dialog, also used by Menu
Quit and Presenter window close. Cancel/Escape resumes the show; explicit Quit
closes it only when notes have no pending writes or unsaved edits. Audience
shortcuts request operator confirmation without showing dialogs or blanking
Slides. Escape still reverts active display trials first.
- Linux formatting, warnings-denied Clippy/rustdoc, workspace tests, build and
13 Python tests pass. GUI coverage remains blocked by `XOpenDisplayFailed` in
this environment; native physical testing and Windows/macOS validation were
not performed.
### 0.1.87
- Add per-screen Follow global / Always fullscreen / Always windowed choices in
Displays. Overrides follow monitor identity through role swaps and hotplug,
bypass global fullscreen commands, and use the existing Keep/Revert trial.
Save bounded v1 settings and send resolved per-output modes to the independent
host, including matching viewport acknowledgments for mixed-mode mirrors.
- Linux formatting, warnings-denied Clippy/rustdoc, workspace tests, build and
13 Python tests pass. GUI coverage cannot complete without an accessible display
(`XOpenDisplayFailed`). Physical mixed-mode display testing remains pending;
Windows/macOS builds were not run.
### 0.1.86
- Hold S for one second in Presenter or All slides to swap display role groups,
including during a live show, using the existing timed Keep/Revert trial.
Ignore repeats and text editing; cancel on release, focus/modifier changes,
other keys or display topology changes. Preserve shown/blanked output.
- Linux formatting, warnings-denied Clippy/rustdoc, workspace tests, build and
13 Python tests pass. GUI coverage is unavailable because the native smoke test
cannot open a display. Physical screen-swap testing remains pending;
Windows/macOS builds were not run.
### 0.1.85
- Document installation through cargo-binstall using repository release archives,
an explicit published version and the prebuilt-only strategy. Verify the Linux
v0.1.83 download and binary resolution with a dry run.
### 0.1.84
- Rewrite the root README for presenters: lead with the tested multi-screen workflow,
per-screen layouts, fast buffered navigation, monitor reconnection, zoom, live
tools, safe slide browsing and portable release downloads.
- Add real application screenshots made with the repository's fictional demo PDF,
covering Presenter, display routing, All slides and the pointer toolbox.
### 0.1.83
- Scale pointers, highlights, arrow shafts and arrow heads against the visible slide
height so they occupy a comparable share of Presenter previews, 1080p Slides and
4K Slides, including mixed-DPI screens. Raise the selectable maximum from 32 to 48
while preserving the lightweight vector overlay path.
- Prepare the 0.1.83 Linux/Windows and one-off Apple Silicon macOS preview release; see the
[release notes](development/release-notes/v0.1.83.md).
- Pin the memory-budget probe to a Rust 1.93-compatible `sysinfo` release so the
one-off macOS target builds with the release tool's pinned Apple toolchain.
### 0.1.82
- Disclose the project's MIT license, LLM-generated or LLM-assisted development,
human review and professional use in the public README.
- Replace the crowded Preferences submenu with a resizable, scrollable Preferences
window for blank-output artwork, Windows PDF integration, RAM, disk cache, cleanup,
preparation status and storage paths. Each Presenter owns its own window instance.
- Keep page zoom, fitted-area zoom behavior and automatic Slides output as direct
quick settings in Menu.
- Linux formatting, Clippy, tests, build, rustdoc and Python helper checks pass.
Headless line coverage is 68.51%, below the 75% floor; no application behavior
changed, and physical-display validation was not run.
### 0.1.81
- Retry Presenter activation for a short bounded period during Windows startup,
after the fullscreen Slides process has had time to map its windows. A Win32
input-queue fallback improves the chance that arrow keys work immediately, and
retries avoid disturbing an already-focused Presenter and stop after the startup
window or when All slides is deliberately focused.
- Host formatting, Clippy, workspace tests and Python helper tests pass, as does
Windows-target Clippy. Foreground behavior still requires a physical Windows test.
### 0.1.80
- Put a visible **Set as default PDF app…** action directly in Preferences on
Windows. It registers the portable executable and PDF icon for the current user,
then opens Default Apps for Windows' required confirmation.
- Formatting, Clippy, workspace tests, Python helper tests and a Windows-target type
check pass. Selecting the association in Windows remains a physical acceptance check.
### 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
@ -700,7 +919,7 @@
### 0.1.0
- Prepared the standalone PDF Presenter repository with a tested navigation/blanking
- Prepared the standalone Deckstride repository with a tested navigation/blanking
core, an explicit bootstrap executable, agent guidance and implementation plan.
- Added Jenkins validation, whole-workspace coverage and isolated three-badge
publication, plus generated application/repository artwork. PDF rendering and

File diff suppressed because one or more lines are too long

View File

@ -11,7 +11,7 @@ dual-screen, startup and responsiveness requirements.
- [Persistent interfaces](../interfaces/README.md)
- [Changelog](../changelog.md)
Run `cargo run --locked -p pdf-presenter` for the native mock-window test.
Run `cargo run --locked -p deckstride` for the native mock-window test.
See the [dual-screen proof guide](dual-screen-poc.md) for controls, limits and the
physical acceptance still required. PDF loading and release bundles remain pending.

View File

@ -1,6 +1,6 @@
# CI and Jenkins setup
Create a Jenkins Multibranch Pipeline for `idle-org/pdf-presenter`, using the root
Create a Jenkins Multibranch Pipeline for `idle-org/deckstride`, using the root
`Jenkinsfile`, SCM credentials and the existing `rust_no_docker` worker. Repository
upload does not create a Jenkins job. Configure branch discovery and a Gitea webhook
in Jenkins/Gitea when connecting the job.
@ -19,7 +19,7 @@ worker and other headless tests still run. The pipeline installs cargo-llvm-cov
and the rustfmt, Clippy and llvm-tools-preview components.
The temporary Jenkins coverage floor is **60%**, selected explicitly by
`PDF_PRESENTER_HEADLESS_CI=1` and `headless-line-floor` in `coverage.toml`. The normal
`DECKSTRIDE_HEADLESS_CI=1` and `headless-line-floor` in `coverage.toml`. The normal
local full-GUI floor remains **75%**. Both measure all production code, including
GUI code; tool/test failures still fail the build and badges report the actual
measurement. Restore full native testing and the 75% Jenkins floor when a display
@ -33,7 +33,7 @@ cargo clippy --locked --workspace --all-targets --all-features -- -D warnings
cargo test --locked --workspace --all-features
cargo build --locked --workspace --all-features
RUSTDOCFLAGS="-D warnings" cargo doc --locked --workspace --all-features --no-deps
PDF_PRESENTER_GUI_TESTS=1 uv run --no-project --python ">=3.11" python scripts/ci.py coverage
DECKSTRIDE_GUI_TESTS=1 uv run --no-project --python ">=3.11" python scripts/ci.py coverage
```
Coverage measures the entire Rust workspace with the selected floor. Add all future
@ -42,7 +42,7 @@ Canvas Pilot and have tests for invalid/stale reports and isolated publication.
Cleanup archives exactly `coverage/version.svg`, `coverage/test.svg` and
`coverage/coverage.svg`. Only main builds without CHANGE_ID publish badges under
`/mnt/assets/coverage/idle-org/pdf-presenter/main/`, including honest failed-test
`/mnt/assets/coverage/idle-org/deckstride/main/`, including honest failed-test
or unavailable-coverage status. No shared asset root is synchronized or deleted.
There is no release job or binary upload in this pipeline.
Separate local packaging uses [rust_realease](releases.md).
@ -52,7 +52,7 @@ worker configuration or prove the remote pipeline has run.
The coverage command above needs a usable desktop session. On a headless POSIX host with Xvfb installed,
run `uv run --no-project --python ">=3.11" python scripts/gui_ci.py python scripts/ci.py coverage` instead. To include
native smoke in local workspace tests, set `PDF_PRESENTER_GUI_TESTS=1`. Without it,
native smoke in local workspace tests, set `DECKSTRIDE_GUI_TESTS=1`. Without it,
the ordinary tests remain headless and explicitly skip native-window smoke. CI uses
neither the flag nor the virtual-display wrapper. Xvfb tests cannot
validate actual monitor routing, compositor policy, macOS Spaces or Windows desktop

View File

@ -7,20 +7,20 @@ explicitly activates mock output; the production document model still starts bla
## Run and test
Build with `cargo build --locked --release`, then run `target/release/pdf-presenter`
(or `pdf-presenter.exe` on Windows). The executable contains the mock data and bitmap
Build with `cargo build --locked --release`, then run `target/release/deckstride`
(or `deckstride.exe` on Windows). The executable contains the mock data and bitmap
font. It needs only normal OS desktop libraries; no PDF renderer, font download,
configuration file or sibling repository is required. Each OS/architecture needs
its own build; a Linux executable is not a Windows/macOS executable.
```sh
cargo run --locked -p pdf-presenter
cargo run --locked -p deckstride
# Inspect display numbering without opening the two windows:
cargo run --locked -p pdf-presenter -- --list-monitors
cargo run --locked -p deckstride -- --list-monitors
# Explicit selection (one-based display numbers from the listing):
cargo run --locked -p pdf-presenter -- --presenter 1 --audience 2
cargo run --locked -p deckstride -- --presenter 1 --audience 2
# Keep both windows decorated for troubleshooting:
cargo run --locked -p pdf-presenter -- --windowed
cargo run --locked -p deckstride -- --windowed
```
With one detected display, fullscreen views overlap. Use `--windowed` to open
@ -79,7 +79,7 @@ The bitmap UI is test instrumentation, not the final presenter design. There is
Tests cover monitor assignment/invalid selection, navigation bounds, blanking,
topology invalidation, negative-coordinate geometry, scaled pointer hit testing and
software frames. `PDF_PRESENTER_GUI_TESTS=1 cargo test --locked --workspace` also opens
software frames. `DECKSTRIDE_GUI_TESTS=1 cargo test --locked --workspace` also opens
real native windows, exercises mock controls/fullscreen transitions and checks frames
were presented to both surfaces. `--smoke-test` exposes that short automatic check.
A virtual display proves native rendering/lifecycle only, not physical placement.

View File

@ -2,8 +2,8 @@
"tool": "built-in image_gen",
"use_case": "logo-brand",
"date": "2026-11-19",
"asset": "crates/pdf-presenter/assets/app-icon.png",
"prompt": "Use case: logo-brand\nAsset type: PDF Presenter desktop app icon and repository avatar, part of the beffroi-tools family.\nInput images: three reference icons showing the exact family style: dark charcoal rounded-square tile, softly beveled silver and bright turquoise objects, gentle 3D depth, subtle teal rim highlight. Use these as style references, not edit targets.\nPrimary request: Create a NEW matching family icon for a multiscreen PDF presenter. Inside the dark rounded-square tile, use a silver folded-corner document in front of a turquoise outlined presentation screen, and a simple bright turquoise play triangle on the document. Crisp bold uncluttered geometry, tactile satin metallic silver, very restrained dimensional shading. Distinct from the existing icons yet obviously in the same set.\nComposition: square, centered tile nearly fills frame, generous clear margins around the inner emblem, readable at 32px. Transparent exterior outside the tile, true alpha. No text, no letters, no watermark, no red, no blue, no photorealistic monitors, no elaborate background.",
"asset": "crates/deckstride/assets/app-icon.png",
"prompt": "Use case: logo-brand\nAsset type: Deckstride desktop app icon and repository avatar, part of the beffroi-tools family.\nInput images: three reference icons showing the exact family style: dark charcoal rounded-square tile, softly beveled silver and bright turquoise objects, gentle 3D depth, subtle teal rim highlight. Use these as style references, not edit targets.\nPrimary request: Create a NEW matching family icon for a multiscreen PDF presenter. Inside the dark rounded-square tile, use a silver folded-corner document in front of a turquoise outlined presentation screen, and a simple bright turquoise play triangle on the document. Crisp bold uncluttered geometry, tactile satin metallic silver, very restrained dimensional shading. Distinct from the existing icons yet obviously in the same set.\nComposition: square, centered tile nearly fills frame, generous clear margins around the inner emblem, readable at 32px. Transparent exterior outside the tile, true alpha. No text, no letters, no watermark, no red, no blue, no photorealistic monitors, no elaborate background.",
"references": [
"beffroi-tools/crates/pptx-reporter/assets/app-icon.png",
"beffroi-tools/crates/rundown-converter/assets/app-icon.png",

View File

@ -90,6 +90,28 @@ This includes pipe transfer to the measurement process, not optical display late
One sample under concurrent build load is diagnostic evidence, not a p95/worst-case
benchmark or comparison against Pympress. The source PDF remains untracked and unchanged.
## 0.1.92 themes and interface languages
The existing 20 built-in Canvas Pilot-inspired palettes remain compile-time data.
English, French, Spanish, Japanese, Simplified Chinese, German and Brazilian
Portuguese are selectable, with supported native locales resolved once per process.
Translations use static match tables: there is no catalog parsing, runtime file I/O
or translation allocation. Detailed worker and operating-system diagnostics retain
their original wording.
Theme application and locale/font setup now short-circuit when the selected value is
already active. Japanese and Simplified Chinese share one embedded Noto Sans CJK
collection; the appropriate face is installed once when a CJK language is selected
and egui's default embedded fonts are restored when leaving it. This work does not
change the independent output process, prepared-frame navigation, PDF workers or
slide texture path.
Linux workspace/native tests, formatting, warnings-denied Clippy/rustdoc, optimized
build and 13 Python helper tests pass. Whole-application GUI coverage is 83.89%
against the 75% floor. CJK tests exercise both selected font faces and every theme/
language combination renders the Presenter, browser and popups. This does not replace
native Japanese/Chinese visual review or physical multi-display acceptance.
## Remaining acceptance and hardening
- User physical Windows/macOS/Linux X11/Wayland matrix: routing, swap, mixed DPI,
@ -228,7 +250,7 @@ memory remains additional. The source SHA-256 was unchanged after the test.
Reproduce explicitly with an authorized local deck (never a CI/private fixture upload):
```sh
PDF_PRESENTER_STRESS_PDF=/path/to/Ravenous.pdf cargo test --locked --release \
DECKSTRIDE_STRESS_PDF=/path/to/Ravenous.pdf cargo test --locked --release \
--test preparation real_pdf_exceeds_budget_and_keeps_navigating -- --ignored --nocapture
```
@ -315,7 +337,7 @@ only Linux development checks were run for this subject.
The software renderer is bundled with a narrow cropped-quad optimization; see
[`vendor/egui_software_backend/PDF-PRESENTER-PATCH.md`](../../vendor/egui_software_backend/PDF-PRESENTER-PATCH.md)
[`vendor/egui_software_backend/DECKSTRIDE-PATCH.md`](../../vendor/egui_software_backend/DECKSTRIDE-PATCH.md)
for provenance and the precise changes. Fixed-point bilinear scanlines reuse two
filtered rows and bounded coordinate tables. Large crops use four disjoint bands
on a lazily initialized pool capped at four CPU threads per native process. This
@ -463,3 +485,29 @@ Validation: Linux workspace/native tests, 13 Python helper tests, formatting and
warnings-denied Clippy/rustdoc pass. Whole-application coverage is 84.78% against
the 75% floor. The Linux release binary is rebuilt. Windows/macOS builds and
physical multi-presenter customization/reconnect acceptance remain open.
## Single-screen view — 0.1.89
Single screen is a saved display-view marker on an operator-owned presenter route.
The independent audience host, its protocol and cached-base drawing path are
unchanged. Native window identity, async chooser ownership, keyboard controls,
supervised rendering and sleep leases reuse the existing presenter path. A distinct
render branch replaces presenter notes/previews with a full-window slide; shared
header/footer controls reveal as overlays. Presenter layouts remain untouched.
Only already prepared full-slide frames are consumed. Each single-screen window
retains at most one slide texture and one optional blank-picture texture; pending
navigation retains the last ready slide, and a new document generation clears it.
Idle repaint and edge reveals reuse texture uploads and fixed slide geometry.
A one-shot monitor-discovery latch, separate from hotplug routing and async settings
completion, controls the startup offer. Zero or multiple initial monitors cannot
later become eligible. A topology change withdraws a pending offer. Saved explicit
single-screen choices and manual Displays edits use the existing timed display
trial, with settings written only on confirmation. Display group swaps exclude
Single screen monitors; ordinary Slides routes never gain reveal controls.
Regression tests cover startup decisions and disconnect/reconnect sequences,
manual selection, reversible trials, role/privacy and blanking preservation,
settings migration/validation, hidden notes/status, fixed slide geometry and
texture reuse through pending navigation. Physical screen placement, edge input
and display-mode transitions still require native testing on the target system.

View File

@ -0,0 +1,52 @@
# Deckstride 0.1.101
This release adds installable language and theme packs while keeping Deckstride's
fast, portable presentation workflow intact. Packs are ordinary data-only ZIP files:
they work offline, are validated before installation, and appear in Preferences as
soon as they are imported.
## Highlights since 0.1.96
- Import language packs and theme packs from **Preferences → General → Appearance**.
Installed choices persist globally and load without network access.
- Use the included documented example packs as templates for a new translation or
visual theme. Pack sizes, paths, identifiers, revisions and expanded contents are
bounded and validated before Deckstride accepts them.
- Reorganize Preferences into clearer General, Presentation, Performance and Storage
sections, while keeping the presentation controls that need quick access in the
main menu.
- Keep the Preferences window stable instead of resizing as the pointer moves.
Deckstride continues to provide independent Presenter and Slides windows, flexible
multi-monitor routing and mirroring, per-screen layouts, buffered PDF rendering,
notes, zoom, pointer and drawing tools, automatic playback, and display recovery.
## Downloads
Portable packages and cargo-binstall archives are provided for:
- Linux x86_64 GNU
- Linux ARM64 musl
- Windows x86_64 GNU
- Apple Silicon macOS 13+
- Intel macOS 13+
Windows and macOS packages are unsigned. On macOS, extract the archive and run:
```sh
xattr -dr com.apple.quarantine /path/to/deckstride
chmod +x /path/to/deckstride
```
Rehearse Deckstride on the actual presentation computer, adapters and display
arrangement before a live event.
## Validation
Linux formatting, warnings-denied Clippy and rustdoc, the Rust workspace tests,
native GUI smoke and Python helper tests pass. The coverage runner completed its
tests but could not satisfy the configured whole-application floor because LLVM
profiles from intentionally terminated worker processes are incomplete. All five
release targets are built and packaged from the tagged commit. Windows multi-screen
behavior has been extensively tested in earlier releases; native runtime testing of
each newly built archive remains appropriate before use in a live show.

View File

@ -1,4 +1,4 @@
# PDF Presenter 0.1.17 preview
# Deckstride 0.1.17 preview
Portable PDF and image-folder presenter with fullscreen presenter/presentation
views, monitor routing/mirroring, notes, slide browser, themes and English/French.

View File

@ -1,4 +1,4 @@
# PDF Presenter 0.1.24 preview
# Deckstride 0.1.24 preview
Portable PDF and image-folder presenter for Linux and Windows x86_64, with separate
fullscreen presenter/presentation views, monitor routing/mirroring, notes, slide

View File

@ -1,4 +1,4 @@
# PDF Presenter 0.1.33 preview
# Deckstride 0.1.33 preview
Portable PDF and image-folder presenter for Linux and Windows x86_64. This preview
includes the changes since 0.1.24:

View File

@ -1,4 +1,4 @@
# PDF Presenter 0.1.68 preview
# Deckstride 0.1.68 preview
This preview adds live presentation tools while preserving the buffered rendering
path. Open **Tools** in the presenter header for a low-latency pointer, straight

View File

@ -1,4 +1,4 @@
# PDF Presenter 0.1.71 preview
# Deckstride 0.1.71 preview
This preview adds disk-cache controls in **Menu → Preferences → Disk cache**.
Set a maximum total size (default **10 GiB**) and lifetime (default **30 days since

View File

@ -1,4 +1,4 @@
# PDF Presenter 0.1.75 preview
# Deckstride 0.1.75 preview
This preview includes the monitor and navigation fixes since 0.1.71:
@ -19,7 +19,7 @@ remain included.
## Windows testing
Use the Windows x86_64 standalone executable or extract the portable ZIP and run
**pdf-presenter.exe**. No Rust toolchain or separately installed PDF backend is
**deckstride.exe**. No Rust toolchain or separately installed PDF backend is
required. The executable is unsigned.
Please exercise three displays with two presenters and one audience output:

View File

@ -1,4 +1,4 @@
# PDF Presenter 0.1.77 preview
# Deckstride 0.1.77 preview
This preview adds two features since 0.1.75:
@ -18,7 +18,7 @@ navigation fixes from 0.1.75 remain included.
## Windows testing
Download the Windows x86_64 standalone executable, or extract the portable ZIP
and run **pdf-presenter.exe**. No Rust toolchain or separately installed PDF
and run **deckstride.exe**. No Rust toolchain or separately installed PDF
backend is required. The executable is unsigned.
With two presenters and an audience display, customize the presenters differently,

View File

@ -1,4 +1,4 @@
# PDF Presenter 0.1.78 preview
# Deckstride 0.1.78 preview
This preview focuses on Windows presentation responsiveness and desktop integration:
@ -11,21 +11,21 @@ This preview focuses on Windows presentation responsiveness and desktop integrat
so opening it does not create a terminal window. Audience windows are created
without activation and the presenter explicitly requests focus when first shown.
- **PDF file icon and association.** Use **Menu → Preferences → Windows integration
→ Choose as PDF app…**. PDF Presenter registers its executable, open command and
→ Choose as PDF app…**. Deckstride registers its executable, open command and
embedded icon for the current user, refreshes Explorer and opens Default Apps.
Windows requires you to confirm the default PDF application there. Keep the
portable folder in a permanent location and repeat this action after moving it.
## Windows testing
Extract the Windows x86_64 portable ZIP and run **pdf-presenter.exe**. Confirm that
Extract the Windows x86_64 portable ZIP and run **deckstride.exe**. Confirm that
no terminal appears and that the presenter accepts keyboard input immediately while
the audience window remains on the selected output. On a high-resolution audience
display, compare pointer, arrow and highlighter tracking with 0.1.77, including zoom
and mirrored audience outputs.
Register PDF Presenter in Preferences, select it for `.pdf` in Default Apps, then
check that Explorer shows the PDF Presenter icon and double-clicking a PDF opens it.
Register Deckstride in Preferences, select it for `.pdf` in Default Apps, then
check that Explorer shows the Deckstride icon and double-clicking a PDF opens it.
The executable is unsigned, and the association is per user without administrator
rights.

View File

@ -0,0 +1,47 @@
# Deckstride 0.1.81 preview
This preview makes multi-Presenter layouts clearer and improves Windows desktop
integration.
- **Presenter and Slides.** The two screen roles now use these names throughout
the interface and guide.
- **Edit any Presenter layout.** Open Layout on any Presenter and use **Edit layout
for** to customize another connected Presenter screen. Live edits and both save
actions remain scoped to the selected screen, including per-project layouts.
- **Default PDF application.** Windows Preferences now shows a visible **Set as
default PDF app…** button. It registers the portable executable, open command and
embedded PDF icon for the current user, then opens Default Apps for Windows'
required confirmation.
- **More reliable initial keyboard focus on Windows.** Presenter activation is
retried for a short bounded period while fullscreen Slides windows finish mapping.
A Win32 input-queue fallback aims to make Left/Right work immediately without a
preliminary mouse click. The sequence ends after startup and does not keep
stealing focus.
## Windows testing
Extract the Windows x86_64 portable ZIP and run **deckstride.exe**. Confirm that
the Presenter accepts Left/Right immediately after launch, including with two or
more fullscreen displays. Repeat from Explorer, a PDF file association and a pinned
shortcut. Open All slides during startup and confirm that it retains focus.
In Preferences, choose **Set as default PDF app…**, select Deckstride for `.pdf`
in Windows Default Apps, then verify that Explorer uses the Deckstride icon and
double-clicking a PDF opens it. Registration is per user and requires no
administrator rights. Keep the portable folder in a permanent location.
With two Presenter screens, edit each from the other's Layout window. Save one as a
project layout and the other as an all-project layout, restart, and confirm their
visual settings remain independent.
## Validation and packages
Formatting, warnings-denied host and Windows-target Clippy, the complete Rust test
suite and all Python packaging tests pass. Headless whole-application line coverage
for 0.1.79 was **68.66%**, above its 60% CI floor.
Linux x86_64 and Windows x86_64 standalone executables, portable bundles, Cargo
binstall archives and SHA-256 checksums are provided. macOS is not packaged.
Windows foreground activation, file association, physical multiscreen,
clean-machine, sleep and performance behavior remain acceptance checks; this is a
preview for testing.

View File

@ -0,0 +1,34 @@
# Deckstride 0.1.83 preview
This preview improves settings organization and makes presentation tools easier to
judge across Presenter previews and high-resolution Slides screens.
- **A clearer Preferences window.** Advanced settings now live in a resizable,
scrollable window. Blank-output artwork, Windows PDF integration, RAM and disk
cache controls, cleanup, preparation status and storage paths no longer crowd the
Menu dropdown. Zoom, fitted-area behavior and automatic Slides output remain in
Menu for quick access.
- **Consistent tool sizing.** Pointer, highlighter and arrow dimensions scale with
the visible slide height. Their relative size now stays comparable in the smaller
Presenter preview, on 1080p output, on 4K output and across OS display scaling.
The maximum selectable size increases from 32 to 48; on a 4K Slides screen it is
rendered at roughly twice the physical width used on 1080p.
- **Transparent project information.** The README states the MIT license and notes
that development uses LLM-generated or LLM-assisted code with human review.
## Validation and packages
Formatting, warnings-denied Clippy and rustdoc, 129 automated Rust tests and 13
Python build-helper tests pass on Linux. The tool-size path remains a lightweight
vector overlay and does not rerender slide images. Windows-target validation on the
release builder includes the embedded application icon; local cross-Clippy could not
pass that resource step because MinGW `windres` is unavailable on the host.
The memory-budget probe is pinned to a Rust 1.93-compatible dependency for the
pinned Apple cross-build toolchain.
Linux x86_64, Windows x86_64 and, for this release, Apple Silicon macOS 13+
standalone executables, Cargo binstall archives and SHA-256 checksums are provided.
Linux and Windows also receive portable bundles. The macOS executable is unsigned
and cross-built from Linux; native Mac startup and multiscreen behavior have not
been tested. Windows runtime, physical multiscreen, clean-machine, sleep and
performance acceptance remain open; this is a preview for testing.

View File

@ -0,0 +1,39 @@
# Deckstride 0.1.90 preview
This preview adds display controls and an optional single-screen presentation view.
- **Single-screen view.** Select Single screen in Displays for full-window slides
with controls revealed at the top and bottom edges. The app offers this mode
only when it starts with exactly one screen, explaining that Deckstride is
intended for separate Presenter and Slides screens. Later disconnects never
trigger the offer. Saved Presenter layouts and the independent audience host
remain separate; controls overlay the slide without resizing it.
- **Per-screen window modes.** Choose Follow global, Always fullscreen or Always
windowed. Overrides ignore global fullscreen commands, follow the monitor, and
use the existing Apply / Keep / Revert confirmation.
- **Hold S to swap.** Hold S for one second in Presenter or All slides to swap
Presenter and Slides groups with a timed confirmation. Single screen assignments
remain in place. Short taps and keyboard repeats do not repeatedly swap screens.
- **Confirmed quitting.** Escape and Ctrl+Q request a Quit presentation dialog;
Cancel or Escape continues the show. Unsaved notes remain protected. Escape
still reverts an active display trial first. Audience shortcuts request the
confirmation on Presenter without showing operator dialogs or blanking Slides.
- **Installation documentation.** The README includes application screenshots and
a repository-based cargo-binstall command for published releases.
## Validation and packages
Linux formatting, warnings-denied Clippy/rustdoc, workspace tests, build and 13
Python helper tests pass for the implementation. Regression coverage includes
startup-only eligibility, disconnect sequences, settings round trips, display
trials, quit confirmation, edge controls, fixed slide geometry and texture reuse.
Full GUI coverage also passes outside the restricted sandbox: **84.83%** against
the 75% floor, including native-window tests. These checks do not establish physical
multiscreen, clean-machine or measured presentation-latency acceptance.
Linux x86_64 and Windows x86_64 standalone binaries, cargo-binstall archives,
portable bundles and SHA-256 checksums are provided. Windows is unsigned. This
release does not include a new macOS build; v0.1.83 retains its one-off Apple
Silicon preview. Native Windows runtime, clean-machine, physical multiscreen,
sleep and measured latency acceptance remain open. Test the actual presentation
computer and display arrangement before a live event.

View File

@ -0,0 +1,32 @@
# Deckstride 0.1.91
Deckstride releases are now regular releases rather than previews. The version
remains below 1.0 while the project continues to refine platform integration and
physical-display acceptance.
## Expanded platform packages
This release provides standalone binaries, cargo-binstall archives, portable
bundles and SHA-256 checksums for:
- Linux x86_64 GNU
- Linux ARM64 musl
- Windows x86_64 GNU
- Apple Silicon macOS 13+
- Intel macOS 13+
The Linux ARM64 build uses musl for a portable executable. Both macOS builds use a
pinned cross-build image and macOS 13 deployment target. Windows and macOS builds
are unsigned. The release page includes the commands needed to run the unsigned
macOS archives.
## Validation
Linux formatting, warnings-denied Clippy/rustdoc, workspace tests, build and 13
Python helper tests pass. Full GUI coverage is **84.79%** against the 75% floor.
The release pipeline also verifies target architecture, archive layout, checksums,
system-library dependencies and isolated cargo-binstall extraction for every
target. Linux x86_64 receives the native-window smoke test. macOS artifacts cannot
be executed on the Linux release host, and native Windows/macOS runtime,
clean-machine and physical multiscreen acceptance remain open. Rehearse on the
actual presentation computer and display arrangement before a live event.

View File

@ -0,0 +1,44 @@
# Deckstride 0.1.96
This is the first release under the **Deckstride** name. The application, executable,
portable archives, desktop integration and repository now use the new identity. The
established application icon remains unchanged.
## What changed since 0.1.91
- Add automatic playback with a configurable slide interval and optional looping.
Playback waits until the requested slide is visible and pauses for dialogs and
safety states.
- Add built-in Spanish, Japanese, Simplified Chinese, German and Brazilian Portuguese
alongside English and French, with offline system-language detection.
- Show the open PDF or picture-folder path in the Presenter footer and show the
running portable executable path in Preferences.
- Preserve existing user settings during the Deckstride rename and continue using
an existing warm rendered-slide cache instead of forcing every presentation to
render again.
The existing multiscreen routing, mirrored Presenter or Slides outputs, per-screen
layouts, buffered rendering, notes, zoom, pointer tools and display recovery remain
the core of the release.
## Downloads
Portable packages and cargo-binstall archives are provided for:
- Linux x86_64 GNU
- Linux ARM64 musl
- Windows x86_64 GNU
- Apple Silicon macOS 13+
- Intel macOS 13+
Windows and macOS packages are unsigned. The macOS packages are cross-built on Linux
and include the release-page command for opening an unsigned application. Rehearse on
the actual presentation computer, adapters and display arrangement before a live
event.
## Validation
Linux formatting, warnings-denied Clippy and rustdoc, the complete Rust workspace
test suite, and all 13 Python CI/launcher tests pass. Windows multi-screen behavior
has been extensively tested in earlier releases; native runtime testing of these new
archives remains appropriate before use in a live show.

View File

@ -1,23 +1,24 @@
# Manual preview releases
# Manual releases
The standalone `rust_realease` tool (sibling checkout `../rust_realease`) consumes
root `rust-release.toml` and `Cross.toml`. Jenkins still only validates/publishes
badges. The release configuration selects Linux x86_64 GNU and Windows x86_64 GNU.
macOS remains an implementation target, but is not advertised as a prepared release
artifact until a linked native build and runtime acceptance are available.
badges. The release configuration selects Linux x86_64 GNU, Linux ARM64 musl,
Windows x86_64 GNU, and both Apple Silicon and Intel macOS 13+ targets. Releases are
ordinary releases below 1.0; do not pass `--prerelease` during publication.
Build local artifacts without a token or contacting Gitea:
```sh
CROSS_CONTAINER_ENGINE=podman ../rust_realease/target/release/rust_realease . \
--package pdf-presenter --compile-only
--package deckstride --compile-only
```
Use the installed `rust_realease` command instead if preferred. Cross must have
access to its configured images. Outputs live under `dist/` (the tool prints the final release directory), including
raw executables, binstall `.tgz` archives, a Linux portable `.tgz`, a Windows
portable `.zip`, and `SHA256SUMS`. The binaries themselves need no companion assets.
Portable bundles add the license, quickstart and optional Python Linux launcher.
raw executables, binstall `.tgz` archives, portable bundles, `SHA256SUMS` and an
artifact manifest. Windows portable bundles use ZIP; other targets use `.tgz`.
The binaries themselves need no companion assets. Portable bundles add the license,
quickstart and optional Python Linux launcher.
Wayland shells resolve icons through the matching installed desktop entry;
X11 and Windows also receive the embedded native window icon directly.
The Windows PE icon is embedded at build time using winresource/windres.
@ -27,19 +28,25 @@ ignored and never included in archives. Dependency notices are embedded (`--lice
and regenerated with `python3 scripts/notices.py` after dependency changes.
Before publication, run all checks in [CI](ci.md), inspect bundle contents and
checksums, and test extracted binaries on clean Windows/Linux machines. Physical
multiscreen, sleep and performance acceptance remains in [the plan](plan.md).
Version 0.1.33 is prepared as a **preview**, not a production-readiness claim.
checksums, and test extracted binaries on available native platforms. Cross-built
macOS artifacts require the generated release-page workaround and native Mac testing
when available. Physical multiscreen, sleep and performance acceptance remains in
[the plan](plan.md).
Publication is a separate explicit action: create local `v0.1.33` at the reviewed
Publication is a separate explicit action: create the version tag at the reviewed
commit, push that commit/tag, then run:
```sh
rust_realease . --package pdf-presenter --prerelease \
--message-file docs/development/release-notes/v0.1.33.md \
--token-file ../gitea-token.txt
rust_realease . --package deckstride \
--message-file docs/development/release-notes/vVERSION.md \
--token-file ../release-tokens.json
```
`release-tokens.json` is an untracked JSON object with `gitea` and `github`
keys. The matching tokens need repository read and release write access. As an
alternative, set `GITEA_TOKEN` and `GITHUB_TOKEN` in the release environment.
The publisher uploads and verifies the same artifacts on both services.
`--dry-run` previews without remote mutation. Before tagging, its missing-tag
prerequisite is expected. Do not use automatic tag/push options as part of local
preparation. Never put credentials in configuration, artifacts or Git.
@ -47,7 +54,7 @@ preparation. Never put credentials in configuration, artifacts or Git.
## Local validation for 0.1.33
Built Linux x86_64 GNU and Windows x86_64 GNU from commit `6bba0c4` with
`CROSS_CONTAINER_ENGINE=podman rust_realease . --package pdf-presenter --compile-only`.
`CROSS_CONTAINER_ENGINE=podman rust_realease . --package deckstride --compile-only`.
Artifacts are in `dist/release-oTFW9Q/`. The installed tool is 0.1.6-rc.2: it builds
raw binaries and binstall archives but does not implement the configured portable
bundles. Those two bundles were assembled from the same binaries using exactly the

BIN
docs/images/all-slides.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

View File

@ -1,5 +1,10 @@
version = 1
# Optional slide-first view on an operator-owned route (0.1.89+).
single_screens = ["Primary#1"]
auto_show = true
autoplay_enabled = false
autoplay_seconds = 5.0
autoplay_loop = false
blank_picture = false
zoom_enabled = false
zoom_keep_fitted_area = false
@ -49,3 +54,9 @@ size = 35.0
[display_layouts."Secondary#1".projects."0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"]
slide_progress = true
slide_progress_height = 40.0
# Per-screen mode overrides (0.1.87+), independent of display roles.
[screen_modes]
"Primary#1" = "always_windowed"
"Secondary#1" = "always_fullscreen"
"Third#1" = "follow_global"

View File

@ -1,7 +1,7 @@
# HTML concept layout storage — version 1
Applies only to `docs/design/presenter-menu.html`, not the native application.
The page uses browser localStorage key `pdf-presenter.menu-layouts.v1`. Storage is
The page uses browser localStorage key `deckstride.menu-layouts.v1`. Storage is
scoped by the browser to the page origin; file-URL handling is browser-dependent.
It is not the native global configuration or a file saved alongside a PDF.

View File

@ -214,3 +214,22 @@ slide, and a failed read leaves blank output black. Worker requests
`PickBlankPicture { owner }` and `BlankPicture { source, path }` select and
import/load the asset; source null loads the stored copy. See
[blank picture](blank-picture.md) for bounds.
## Per-screen window mode — 0.1.87
HostState adds `screen_fullscreen`, a monitor-ID-to-boolean map containing the
resolved mode for each assigned Slides monitor (at most 32 route entries).
Missing entries fall back to the existing `fullscreen` role-wide boolean.
The presenter resolves saved or trial overrides before sending; the map contains
no presenter layout, notes or paths. Placement and OutputViewport acknowledgments
use the same per-monitor value. Full state updates replace the map; lightweight
zoom/overlay updates preserve it. Values round-trip through JSON; both processes
must still run the same executable build.
## Quit confirmation — 0.1.88
ACK adds optional boolean `request_quit` (default false). Escape/Ctrl+Q on a
connected output requests the shared operator-only quit dialog; it does not blank
or stop the output. No confirmation text or notes are sent to the audience host.
Only a confirmed presenter-side quit triggers existing shutdown. Escape retains
priority for display-trial rollback; an orphan output can still close directly.

View File

@ -1,9 +1,12 @@
# Native settings, version 1
`settings.toml` is stored in `$XDG_CONFIG_HOME/pdf-presenter` (otherwise
`~/.config/pdf-presenter`) on Linux. `directories::ProjectDirs` with qualifier `com`,
organization `Beffroi`, application `PdfPresenter` supplies other platforms' standard
per-user config/cache directories. The UI reports the actual configuration path.
`settings.toml` is stored in `$XDG_CONFIG_HOME/deckstride` (otherwise
`~/.config/deckstride`) on Linux. `directories::ProjectDirs` with qualifier `com`,
organization `Beffroi`, application `Deckstride` supplies other platforms' standard
per-user config/cache directories. On first start after the rename, Deckstride
copies valid settings from the former application directory when the new file does
not exist. It keeps using an existing warm slide cache until the new cache has been
populated, avoiding a forced rerender. The UI reports the actual configuration path.
There is no separate project file or source-side settings write.
The top-level `version = 1` is mandatory semantically (omitted defaults to 1).
@ -33,15 +36,33 @@ flushed temporary file. Unknown fields are ignored and not preserved on round tr
document open; false starts/opens blanked. Manual navigation preserves blanking.
Since 0.1.51, display topology/fullscreen changes and host recovery preserve
the current output visibility; only explicit blank controls change it.
- `autoplay_enabled`: boolean, default false; `autoplay_seconds`: finite floating
seconds from 0.25 through 3600, default 5; and `autoplay_loop`: boolean, default
false (0.1.95). The interval begins only after the requested slide is visible on
Slides, so rendering delays do not consume a slide's display time. With no Slides
route, a ready Presenter/single-screen frame counts as visible. Manual navigation,
zoom and blank/unblank restart the interval. Blanking, loading, display trials,
startup recovery, file dialogs, notes editing/import and quit confirmation pause
autoplay and resume with a fresh interval. At the final slide autoplay stops unless
loop is enabled; a one-slide deck never repeatedly navigates. The enabled state,
timing and loop preference are global and saved immediately. Runtime deadlines and
final-slide state are transient. Older v1 files use the defaults; older binaries
ignore and discard these additive fields on resave.
- `theme`: built-in palette enum in snake_case, default `midra` (0.1.14). Values:
`midra`, `high_contrast`, `foxified_dark`, `corporate_light`, `bluecore`,
`dupont_monsanto`, `eden_green`, `foxified_light`, `hci`, `iron_docks`, `peaceframe`,
`rebel`, `sirius_mind`, `solarized`, `sons_of_banard`, `storm_pilot`,
`tessier_ashpol`, `ustf`, `verdant_rebel`, `weicat_industrial`.
- `language`: `system` (default), `en` or `fr` (0.1.14). Native OS locale selects
French for `fr*`, English otherwise. Unknown theme/language values are rejected.
- `language`: `system` (default), `en`, `fr`, `es`, `ja`, `zh_cn`, `de` or `pt_br`.
Spanish, Japanese, Simplified Chinese, German and Brazilian Portuguese were added
in 0.1.92. Native OS locale selects a supported language by language/script and
region; Traditional Chinese and unsupported Portuguese regions fall back to
English rather than silently selecting a different written standard.
Unknown theme/language values are rejected.
Missing new fields in older v1 files use these defaults; no migration is required.
Theme, language and automatic-output changes persist asynchronously, globally.
Catalog lookup is compiled, allocation-free and never reads files on the input or
render path. Theme and font state is rebuilt only when the selection changes.
- `layout`: `previous`, `current`, `next`, `notes`, `elapsed`, `clock`, each with
boolean `show` and finite floating `size`; plus boolean `header`/`footer`.
Previous/next sizes are relative weights 30–160, current 60–200; notes size
@ -109,7 +130,40 @@ flushed temporary file. Unknown fields are ignored and not preserved on round tr
- `routes.presenter` and `routes.presentation`: arrays of monitor identifiers
(`native-name#occurrence`), disjoint and unique, at most 32 entries combined.
Saved preferences are not overwritten by temporary missing-monitor fallback.
- `single_screens`: optional array added in 0.1.89, default empty. Up to 32 unique
monitor IDs, each a nonempty UTF-8 string of at most 1024 bytes; no units.
A marker is active only while its monitor is in `routes.presenter`; those
windows retain operator-process ownership but use the slide-first single-screen
view. Audience routes never use this marker to reveal operator controls.
Displays presents this combination as the separate Single screen role. Choosing
another role removes that connected monitor's marker. Disconnected markers are
retained; group swaps leave active Single screen monitors in place.
Apply previews routes and markers together; Keep changes persists both, while
Revert, timeout or hotplug discards trial values. Single-screen windows use the
global `presentation_fullscreen` default and per-screen `screen_modes` overrides.
Existing presenter layouts are preserved and restored when switching back.
Old v1 files migrate with an empty array; older binaries ignore this additive
field and show the ordinary Presenter view on the operator-owned route.
The startup offer/decision is transient, never serialized. It is eligible only
on the first native monitor discovery with exactly one screen, after settings
load, and is suppressed for an already configured Single screen monitor. A
topology change withdraws it permanently for that run; later disconnects or
reconnections never create an offer. Round-trip and invalid-boundary tests cover
the saved array; startup/hotplug tests cover the transient decision.
- `presenter_fullscreen`, `presentation_fullscreen`: booleans, default true.
- `screen_modes`: optional monitor-ID map added in 0.1.87. Values are
`follow_global`, `always_fullscreen`, or `always_windowed`; unknown values fail
deserialization. At most 128 entries, with nonempty UTF-8 keys of at most 1024
bytes. No units. Missing maps/entries follow the role's global fullscreen flag;
old v1 files need no migration. Forced choices override global fullscreen
commands and the `--windowed` global startup default. Choices stay attached to
the monitor ID across role swaps, mirrors, disconnects and reconnects, including
unused monitors. The All slides auxiliary window remains windowed.
Apply previews the map in the timed display trial; only Keep changes saves it.
Revert, timeout and hotplug restore confirmed preferences. The UI removes an
entry when Follow global is selected; explicit `follow_global` entries also
round-trip unchanged. Older binaries ignore this additive map and discard it
on resave. See the example and settings round-trip/boundary tests.
- `browser_monitor`: optional monitor ID; missing/unavailable means presenter screen.
- `thumbnail_size`: logical width in pixels, finite 100–400; default 220.
- `disk_cache.max_mib`: integer 64–1048576 MiB, default 10240 (10 GiB).

29
docs/packs/README.md Normal file
View File

@ -0,0 +1,29 @@
# Deckstride language and theme packs
Install either example from **Preferences → General → Appearance**. Packs remain
ZIP files and are copied into Deckstride's configuration directory; they contain
data only and are never extracted or executed.
## Language pack
`deckstride-language-pack.zip` uses the same version-2 manifest shape as Canvas
Pilot: `manifest.json` and one root `<locale>.json` per language. Catalog keys are
Deckstride's exact visible English source strings, and missing keys fall back to
English. A pack may contain 1–16 languages. Pack/locale IDs use lowercase ASCII
letters, digits and hyphens. Increase the positive `revision` to publish an update.
Limits: 2 MiB ZIP, 4 MiB expanded data, 32 installed packs, 4,096 messages per
catalog, and no paths, directories, symlinks or unexpected files.
## Theme pack
`deckstride-theme-pack.zip` is a Canvas Pilot format-1 theme pack containing one
root `manifest.json`. It can contain 1–16 complete themes. Colors are opaque
`#RRGGBB` values using the shared Canvas Pilot roles. `light` selects egui's light
or dark base behavior. Keep license and attribution text in `notices`.
Limits: 2 MiB ZIP, 4 MiB manifest, 32 installed packs, and no executable content.
Higher revisions replace an installed pack with the same ID. Equal or older
revisions are rejected, preventing accidental downgrades. Invalid packs are skipped
at startup and reported in the Presenter status line.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,16 @@
{
"Preferences": "Agordoj",
"General": "Ĝenerala",
"Performance": "Rendimento",
"Storage": "Konservejo",
"Theme": "Etoso",
"Language": "Lingvo",
"Close": "Fermi",
"Menu": "Menuo",
"Presenter": "Prezentanto",
"Slides": "Lumbildoj",
"Previous": "Antaŭa",
"Next": "Sekva",
"Show slides": "Montri lumbildojn",
"Blank slides": "Kaŝi lumbildojn"
}

View File

@ -0,0 +1,12 @@
{
"version": 2,
"id": "example-language",
"revision": 1,
"languages": [
{
"locale": "eo-example",
"name": "Example Esperanto",
"native_name": "Ekzempla Esperanto"
}
]
}

View File

@ -0,0 +1,29 @@
{
"version": 1,
"id": "example-theme",
"revision": 1,
"themes": [
{
"id": "night",
"name": "Example Night",
"light": false,
"colors": {
"canvas": "#15202b",
"banner": "#203040",
"grid": "#3e5870",
"layer": "#26394a",
"pattern": ["#24384a", "#182634"],
"bg": "#101820",
"panel": "#192733",
"field": "#0d151c",
"line": "#42627d",
"text": "#eef7ff",
"muted": "#aec7d9",
"cyan": "#65d9ef",
"amber": "#f0c674",
"purple": "#554b9a"
}
}
],
"notices": "Original example palette for Deckstride. CC0-1.0; attribution is not required."
}

View File

@ -1,11 +1,11 @@
PDF Presenter — preview release
Deckstride — portable release
Windows: extract the ZIP and run pdf-presenter.exe. Its icon is embedded.
Linux: extract the tarball and run ./pdf-presenter. Optional menu/taskbar
Windows: extract the ZIP and run deckstride.exe. Its icon is embedded.
Linux: extract the tarball and run ./deckstride. Optional menu/taskbar
integration: keep the extracted folder in a permanent location, then run
python3 install-linux-launcher.py. No root privileges are needed. Python is
only needed for this optional installer, never for running PDF Presenter.
To remove integration delete ~/.local/share/applications/pdf-presenter.desktop
only needed for this optional installer, never for running Deckstride.
To remove integration delete ~/.local/share/applications/deckstride.desktop
(or the corresponding file under your XDG_DATA_HOME).
Wayland shells use that desktop entry to resolve the application icon.
@ -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.
Rehearse on the actual presentation computer, adapters and display arrangement
before a live event.

View File

@ -1,13 +1,15 @@
# Using PDF Presenter
# Using Deckstride
## Install and update
Download a preview from the [releases page](https://proxy.dandaedre.com/gitea/idle-org/pdf-presenter/releases).
Choose the portable ZIP for Windows x86_64 or portable `.tgz` for Linux x86_64,
extract the whole archive, and run `pdf-presenter.exe` or `./pdf-presenter`.
Download the latest version from the [releases page](https://proxy.dandaedre.com/gitea/idle-org/deckstride/releases).
Choose the portable ZIP for Windows x86_64 or the portable `.tgz` matching Linux
x86_64, Linux ARM64, Apple Silicon macOS or Intel macOS. Extract the whole archive,
then run `deckstride.exe` or `./deckstride` as directed on the release page.
No Rust toolchain, Python or separate PDF renderer is needed to run the application.
Linux uses the system desktop services and X11/Wayland libraries. Windows binaries
are unsigned; macOS packages are not currently provided. Release assets include
are unsigned; macOS packages are unsigned and require the release-page workaround.
Release assets include
`SHA256SUMS` for checking downloads.
For optional Linux application-menu and Wayland icon integration, keep the extracted
@ -15,20 +17,23 @@ folder in a permanent location and run `python3 install-linux-launcher.py` there
Python is only needed for this optional installer; no administrator privileges
are required.
On Windows, use **Menu → Preferences → Windows integration → Choose as PDF
app…** to register the portable executable for the current user. Windows opens
Default Apps for the required confirmation. Once PDF Presenter is selected for
`.pdf`, Explorer uses the icon embedded in `pdf-presenter.exe` for PDF files. Keep
On Windows, use **Menu → Preferences… → General → Set as default PDF app…** to register the
portable executable for the current user. Windows opens
Default Apps for the required confirmation. Once Deckstride is selected for
`.pdf`, Explorer uses the icon embedded in `deckstride.exe` for PDF files. Keep
the extracted folder in a permanent location; repeat the action after moving it.
To update, close PDF Presenter, download and extract the new portable release,
To update, close Deckstride, download and extract the new portable release,
and run its executable. Settings and saved layouts live in your user configuration
directory, outside the extracted folder. If you installed the Linux launcher, rerun
its installer from the new location so it points to the updated binary.
**Menu → Preferences… → Storage** shows the full path of the
currently running executable, so you can find its portable folder when updating or
removing the application.
These are preview releases: physical display routing, sleep prevention and
clean-machine compatibility still need acceptance testing. Rehearse on the displays
you plan to use before a live event.
Physical display routing, sleep prevention and clean-machine compatibility still
need broader acceptance testing. Rehearse on the displays you plan to use before a
live event.
## Open your slides
@ -42,10 +47,32 @@ do not queue additional dialogs.
A single connected monitor starts presenter-only rehearsal; `--windowed` disables
fullscreen for the session. `--list-monitors` lists CLI display numbers.
Use **Menu → Autoplay** to enable automatic slide changes, choose the time each
visible slide remains on screen, and optionally loop from the final slide back to
the first. Slow preparation never shortens a slide's display time. Manual navigation,
zooming or blanking restarts the interval; dialogs and display confirmation pause it.
## Screens and presentation safety
When the application starts with exactly one connected screen, it offers
**Single-screen mode** and explains that Deckstride is intended for a presenter
setup with separate Presenter and Slides screens. Choose **Keep Presenter view**
to continue with the usual controls, or **Use single-screen mode**, then **Keep
changes** to save it. This prompt is only offered at startup; disconnecting screens
later never enables this mode or creates a new prompt.
You can also select **Single screen** for a monitor in **Displays**, then Apply
and Keep changes. It fills that screen with the current slide. Move the pointer to
the top for Menu, Displays, fullscreen and blank/show controls, or to the bottom
for navigation. Controls overlay the slide without resizing it and hide after the
pointer leaves the edge. Normal navigation shortcuts and quit confirmation work.
The view shows no notes or next-slide previews unless you explicitly open another
operator tool. Choose **Presenter** in Displays to return to its saved layout.
Single screen uses the Slides fullscreen default and respects per-screen window
mode overrides. Swap groups leaves Single screen assignments in place.
Both roles default to fullscreen. Displays lists connected screens: assign each
Unused, Presenter or Presentation, including several screens per role. Swap groups
Unused, Presenter, Slides or Single screen, 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.
@ -53,13 +80,26 @@ Confirmation controls appear on presenter and output windows so either screen ca
recover the change. Unconfirmed choices are never saved, and a disconnect cancels
the trial. Navigation is held until the trial is resolved; explicit blank/show controls remain available.
Hold **S** for one second in Presenter or All slides to swap the whole Presenter
and Slides groups, including during a show. The same Keep/Revert trial applies.
A short tap does nothing; release and press again for another swap. Focus loss,
a modifier or another key cancels the hold. The shortcut is inactive while typing
in controls, editing/importing notes, loading, or confirming a display trial.
Each screen in **Displays** has a **Window mode** dropdown:
**Follow global**, **Always fullscreen**, or **Always windowed**. Forced modes
ignore Enter/Exit fullscreen commands and the global fullscreen checkboxes.
They stay with the screen when you swap roles or reconnect it. Apply and Keep
changes save the choices; Revert restores the previous modes. All slides remains
an ordinary window regardless of its screen's mode.
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,29 +108,36 @@ 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 → 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 /
**Escape** or **Ctrl+Q** opens **Quit presentation?** in Presenter or All slides.
Choose **Quit presentation** to close the application, or **Cancel** (also Escape)
to continue. Menu → Quit and closing a Presenter use the same confirmation.
Unsaved notes or active notes writes/imports must be saved, discarded or finished
before quitting; Cancel returns to the editor. Slides keeps its current visibility
while confirmation is open. Shortcuts on a connected Slides window request the
confirmation on Presenter, never on the audience display. Escape still reverts
an active display trial before offering to quit. 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
editors and Ctrl/Alt/Command combinations retain keyboard priority. Type a 1-based slide
number then Enter to jump; Backspace edits and Escape cancels. Out-of-range numbers
number then Enter to jump; Backspace edits or clears it. Out-of-range numbers
do not navigate. Output windows accept B for emergency blanking. Escape never blanks a connected
show; it only reverts a display trial or closes an orphaned output.
show; it requests quit confirmation, reverts a display trial, or closes an orphaned output.
Hold Next/Previous, an arrow key, Page Up/Down or Space (Shift+Space backwards)
to accelerate. The first step is immediate; after 400 ms, single steps repeat every
@ -119,9 +166,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
@ -171,17 +219,18 @@ Opening a show starts two supervised preparation workers. The current slide gets
Then the **entire deck** is prepared at the largest connected role screen's pixel
edge, preserving slide aspect ratio. Smaller screens use that same frame scaled to
fit; separate copies for every smaller resolution would waste RAM. The current
renderer limit is 4096 pixels per side, shown in Menu → Preferences. Resolution changes start a
renderer limit is 4096 pixels per side, shown in the Preferences window. Resolution changes start a
new preparation pass with a new buffer identity.
Processed frames are kept in the application's persistent cache; Menu → Preferences → Storage locations shows its
Processed frames are kept in the application's persistent cache; **Menu → Preferences… → Storage** shows its
location. Reopening with unchanged source contents, resolution and renderer reuses
those frames without PDF rasterization or image decoding. It still verifies source
identity/checksums and reads frames into RAM: a restart cannot literally take zero
time. A warm full-size cached frame appears directly, without an unnecessary preview
render. Sources and their folders remain unchanged.
The footer shows the active operation, slides prepared/total, cache reuse, decoded
The footer shows the open PDF or picture-folder name and full source path, along
with 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 during initial preparation if the footer is hidden. Routine rolling-buffer
@ -194,7 +243,7 @@ Navigation then performs no application slide-file reads, PDF rendering or image
decoding. Raster composition still happens, and the OS can page memory under pressure.
The entire deck stays resident when it fits the configured RAM budget.
Menu → Preferences → RAM budget controls the decoded-slide allowance for **each process**, default
**Menu → Preferences… → Performance** controls the decoded-slide allowance for **each process**, default
15% of available RAM, with a soft 512 MiB minimum that yields when it would
exceed 20% of available RAM. The adjustable range is 64–16384 MiB. Saved budgets
are preserved; the automatic default is chosen when no budget has been saved. Presenter and output can each consume
@ -239,8 +288,11 @@ 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
Menu opens a dropdown below its button; click outside to dismiss it.
Page zoom, fitted-area zoom and automatic Slides output stay in this dropdown for
quick access. **Preferences…** opens a separate resizable window for blank-output
artwork, RAM and cache controls, preparation/storage details and Windows integration.
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**.
@ -248,16 +300,29 @@ The numbered screen rectangles in **Displays** reflect each monitor’s pixel as
ratio, so portrait, standard and ultrawide displays are easier to distinguish.
They represent proportions, not physical screen size.
Menu → Appearance → Theme offers the same 20 built-in palettes as Canvas Pilot, including light,
dark and High Contrast. Menu → Appearance → Language offers System, English and Français. System
uses the native OS locale and falls back to English for other languages. Choices are
saved globally and apply to all presenter/browser windows; slides are never recolored.
The controls and preparation progress are translated; detailed worker/OS diagnostics
remain verbatim. Additional Canvas Pilot languages and external theme/language packs
are not included in this version.
**Preferences → General → Appearance** offers the same 20 built-in palettes as
Canvas Pilot, including light, dark and High Contrast. Its Language selector offers
System, English, French, Spanish, Japanese, Simplified Chinese, German and Brazilian
Portuguese. System uses the native OS locale when it matches one of these choices and
otherwise falls back to English. Traditional Chinese is not silently treated as
Simplified Chinese. Choices are saved globally and apply to all presenter/browser
windows; slides are never recolored.
Choose **Import language pack…** or **Import theme pack…** in the same section to
install a bounded ZIP. Installed languages and themes join the selectors immediately
and load offline on later starts. Higher revisions update a pack; equal or older
revisions are rejected. The ZIP is copied beside settings and is never extracted or
executed. The [pack guide](packs/README.md) includes editable sources and
ready-to-import examples.
Built-in translations need no runtime file reads; imported catalogs are read once at
startup and retained in memory. Japanese and Chinese use the bundled Noto Sans CJK
font, loaded only when one of those built-in languages is active. Theme styles and
language fonts are rebuilt only when their selection changes. Detailed worker and
operating-system diagnostics remain verbatim.
All slides opens a windowed browser above fullscreen windows and requests focus.
Opening it again restores/focuses the existing browser. Close or Escape dismisses it.
Opening it again restores/focuses the existing browser. Its Close button dismisses it; Escape requests application quit confirmation.
The destination remains configurable in the browser, defaulting to the presenter.
Window-manager focus restrictions may still require clicking the browser on some systems.
@ -275,7 +340,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.
@ -317,16 +382,16 @@ If your Niri rules still tile it, you can add this optional rule to your own con
```kdl
window-rule {
match app-id="^pdf-presenter$" title="^PDF Presenter — All slides$"
match app-id="^deckstride$" title="^Deckstride — All slides$"
open-floating true
}
```
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.
the browser. It does not change the presentation. Close it with its X.
When Change on click is enabled, clicks switch the live slide and do not open previews.
The All slides grid fills the browser width and adapts as you resize it. Preview
@ -341,7 +406,7 @@ its embedded notes. For an image folder, the named file sits beside the folder a
uses image filenames as keys. See the [notes format](interfaces/presentation-notes.md).
**Double-click the notes pane** to edit that slide. If the named notes file does not
exist, PDF Presenter creates it with all notes found across the presentation before
exist, Deckstride creates it with all notes found across the presentation before
opening the editable text. Creation and saving happen in the background.
Choose **Save notes** to update this page and its auto-fit presenter text. Other
@ -367,21 +432,21 @@ and [format contract](interfaces/presentation-notes.md#importing-txt-and-markdow
## Zoom and move around a slide
Zoom is **off by default**. Enable **Menu → Preferences → Enable page zoom**.
Zoom is **off by default**. Enable **Menu → Enable page zoom**.
The preference is saved globally; it does not change presentation visibility.
By default, zoom expands the page into the available screen area without stretching.
For example, an A4 portrait page fills a widescreen display as you zoom in; drag to
see the cropped top/bottom. Each screen adapts to its own dimensions. To retain
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 original page-shaped area and its margins, enable **Menu → 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.
@ -401,8 +466,8 @@ cache rewrite or disk access is triggered by changing the zoom. This prioritizes
response time; text/images may look softer when enlarged, especially while only a
low-resolution preview is available. Normal background preparation continues.
The Preferences disclaimer explains that software drawing can slow down on large
or multiple displays. If three consecutive zoomed frames take over 33 ms each to
Software drawing can slow down on large or multiple displays. If three consecutive
zoomed frames take over 33 ms each to
render/present on a window, a **Zoom performance** warning appears on the presenter
with reset, disable and keep-enabled choices. This is a detected frame-budget
warning, not proof that zoom caused the delay. It does not blank or interrupt the
@ -410,7 +475,7 @@ output. It cannot predict compositor/hardware delays or guarantee a frame rate.
### Disk cache cleanup
In **Menu → Preferences → Disk cache**, set the maximum total size in MiB and
In **Menu → Preferences… → Performance**, set the maximum total size in MiB and
lifetime in days since rendering (defaults: 10 GiB and 30 days). Automatic cleanup runs once at startup, after initial document loading and slide
preparation complete, deleting expired files and then the oldest files to meet the
size target. Changing limits takes effect at the next startup; manual expunge remains
@ -420,10 +485,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 **Menu → Preferences… → General → Blank Slides image → 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.

View File

@ -1,31 +1,57 @@
[release]
tag-prefix = "v"
[[release.endpoints]]
name = "gitea"
provider = "gitea"
repository = "https://proxy.dandaedre.com/gitea/idle-org/deckstride"
token-env = "GITEA_TOKEN"
[[release.endpoints]]
name = "github"
provider = "github"
repository = "https://github.com/idle-org/Deckstride"
token-env = "GITHUB_TOKEN"
[build]
targets = ["x86_64-unknown-linux-gnu", "x86_64-pc-windows-gnu"]
targets = [
"x86_64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"x86_64-pc-windows-gnu",
"aarch64-apple-darwin",
"x86_64-apple-darwin",
]
profile = "release"
locked = true
[build.apple]
image = "ghcr.io/rust-cross/cargo-zigbuild@sha256:9b4f6b3eb9e8f9fefb3960fe288ddba576627d66d9eff851ce7f62d2455564a5"
deployment-target = "13.0"
sdk-root = "/opt/MacOSX11.3.sdk"
[package]
format = "both"
[[package.bundles]]
name = "portable"
targets = ["x86_64-unknown-linux-gnu", "x86_64-pc-windows-gnu"]
formats = { x86_64-pc-windows-gnu = "zip", x86_64-unknown-linux-gnu = "tgz" }
targets = [
"x86_64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"x86_64-pc-windows-gnu",
"aarch64-apple-darwin",
"x86_64-apple-darwin",
]
formats = { x86_64-pc-windows-gnu = "zip", x86_64-unknown-linux-gnu = "tgz", aarch64-unknown-linux-musl = "tgz", aarch64-apple-darwin = "tgz", x86_64-apple-darwin = "tgz" }
archive-name = "{name}-{bundle}-{target}-v{version}"
root = "{name}-{bundle}-{target}-v{version}"
cargo-binaries = "all"
files = [
{ source = "assets/window-icon.png", destination = "pdf-presenter.png" },
{ source = "assets/window-icon.png", destination = "deckstride.png" },
{ source = "scripts/install-linux-launcher.py", destination = "install-linux-launcher.py", workspace-relative = true },
{ source = "LICENSE", destination = "LICENSE.txt", workspace-relative = true },
{ source = "docs/portable-quickstart.txt", destination = "README.txt", workspace-relative = true },
]
[[repository.fallbacks]]
origin = "https://git.dandaedre.com/idle-org/pdf-presenter"
fallback-url = "https://proxy.dandaedre.com/gitea/idle-org/pdf-presenter"
[gitea]
token-env = "GITEA_TOKEN"
origin = "https://git.dandaedre.com/idle-org/deckstride"
fallback-url = "https://proxy.dandaedre.com/gitea/idle-org/deckstride"

View File

@ -28,7 +28,7 @@ def config():
def coverage_floor():
key = "headless-line-floor" if os.environ.get("PDF_PRESENTER_HEADLESS_CI") == "1" else "line-floor"
key = "headless-line-floor" if os.environ.get("DECKSTRIDE_HEADLESS_CI") == "1" else "line-floor"
return config()[key]

View File

@ -30,7 +30,7 @@ def run(command):
if not number.isdecimal() or len(number) > 5:
log.seek(0)
raise RuntimeError("Xvfb startup failed: " + log.read(2048).decode(errors="replace"))
env = dict(os.environ, DISPLAY=f":{number}", PDF_PRESENTER_GUI_TESTS="1")
env = dict(os.environ, DISPLAY=f":{number}", DECKSTRIDE_GUI_TESTS="1")
env.pop("WAYLAND_DISPLAY", None)
env.pop("WAYLAND_SOCKET", None)
return subprocess.run(command, env=env, timeout=1800).returncode

Some files were not shown because too many files have changed in this diff Show More