app: draw champion portraits, a 16:9 player and draggable scroll bars

Cards and the review header showed two initials where a champion
portrait belongs. Data Dragon is fetched from a worker thread and cached
under the user's cache directory, so the first sight of a champion puts
its face on the card and later runs read it from disk; offline, the tile
keeps its initials on the champion's colour.

The review screen put the clip in a small box above two list columns.
The clip now fills the window at 16:9 and the highlights and timeline
open beside it on demand, so nothing shrinks the video by default and
every event still marks the scrubber.

Scroll bars were a thumb drawn over the cards that could not be
dragged. They now sit in a strip the content leaves free, stay visible
while the list overflows, and scroll the viewport when dragged.
This commit is contained in:
vhaudiquet committed 2026-11-16 18:24:39 +01:00
1 parent 3d0cad3312
commit 227aecb8f6
10 files changed
+500 -181

No files matched your search

+13 -8
View File
@@ -34,8 +34,9 @@ from disk. Loading them takes a few seconds with a large history, so give it tim
cargo run -- --snap live.png --live --at 40
```
Without `--live`, a headless run never starts the daemon or touches the disk: `App::new` loads the
sample recordings from `history::sample` when it sees rune's tooling flags.
Without `--live`, a headless run never starts the daemon and reads no recording: `App::new` loads
the sample recordings from `history::sample` when it sees rune's tooling flags. Portraits still
come from the Data Dragon cache (or download into it) so the PNGs show real champion faces.
## Test
@@ -56,6 +57,7 @@ reading (`history::tests`), highlight clipping (`highlight::tests`) and formatti
| `src/daemon.rs` | Finding, starting and logging the daemon |
| `src/settings.rs` | The daemon's settings model, field for field |
| `src/history.rs` | Timelines from disk and the values the cards show |
| `src/portraits.rs` | Champion portraits: the Data Dragon cache and its downloads |
| `src/highlight.rs` | Highlight clips from kill events |
| `src/export.rs` | ffmpeg clip export |
| `src/os.rs` | Run key, toasts, tray icon and menu |
@@ -73,14 +75,16 @@ reading (`history::tests`), highlight clipping (`highlight::tests`) and formatti
3. Settings: done. General, recording, audio and daemon tabs; device and encoder lists come from
`getAudioDevices` and `getEncoders`; changes go out through `updateSettings`, and each
application volume slider sends `updateAudioSource` as it moves.
4. Match history: done. Cards read `GameHistory.vue`'s fields (result, champion, queue, KDA,
CS/m, gold/m, LP change) from the raw API responses in each timeline, with the queue filters.
4. Match history: done. Cards read `GameHistory.vue`'s fields (result, champion portrait,
queue, KDA, CS/m, gold/m, LP change) from the raw API responses in each timeline, with the
queue filters. Portraits come from Data Dragon and are cached on disk (`src/portraits.rs`).
5. Video: not libmpv. Rune ships a `Player` with a native surface and frame seeking
(`Player::file`, `seek`, `duration`), which removes the OpenGL and wgpu interop question the
TODO opened. The review screen uses it. If clip-accurate seeking turns out to be worse than
mpv's, the three options in TODO.txt still apply; `Player` is confined to `screens/review.rs`.
6. Game review: done. Scrubber with highlight markers, timeline list, play/pause, +/-10 s, and
ffmpeg export per highlight.
6. Game review: done. The clip fills the window at 16:9, with play/pause, +/-10 s, and a
scrubber that marks every event; highlights (play, export) and the timeline sit in a side
panel, one press away. ffmpeg exports each highlight.
7. OS integration: tray icon with open/hide/record/quit, launch at login through the Run key,
single instance, and toasts on recording start and stop.
8. Installer: `packager.toml` targets NSIS and copies the daemon and its OBS files beside the
@@ -91,8 +95,9 @@ reading (`history::tests`), highlight clipping (`highlight::tests`) and formatti
### Known gaps
- Champion and item images are not drawn: the app has no Data Dragon image cache yet, so cards
show names and numbers.
- Item images are not drawn. Champion portraits download from Data Dragon on first sight and are
cached under the user's cache directory; offline, a card falls back to initials on the
champion's colour.
- The installer has not been run on a clean VM.
## The vendored crates