mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-29 12:37:51 -06:00
LR-FILMSTRIP: grid and filmstrip keep the user's scroll position; wheel scrolls the filmstrip
Fixes #11. Root cause: the grid and the filmstrip remembered the last active photo in egui temp data with mismatched types (inserted `Option<PhotoId>`, read back as `PhotoId` because of the `let last: Option<PhotoId> = get_temp(..)` annotation), so the read always missed, "the active photo changed" was true on every frame and both called `scroll_to_rect` on the active photo every frame. Any wheel or scroll-bar scroll was undone as soon as the user stopped (the animated scroll back read as a delayed snap). - `grid::follow_active` (shared by grid and filmstrip): scroll to the active photo only when it changed since the strip was last drawn, or when the strip was not drawn on the previous pass (view switch). Time passing, finished renders, edits and a released scroll bar no longer move either strip. - Filmstrip: a vertical mouse wheel scrolls it sideways (horizontal trackpad scrolling still works); it recentres on a new active photo only when that is off screen, so a click on a visible thumbnail leaves it alone. - `ui.inspect` reports `scroll: {grid, filmstrip}`; headless tests in `tests_scroll.rs`. - docs/parity.md (LR-VIEW-PHOTOGRID, LR-VIEW-FILMSTRIP), docs/control-protocol.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
296c67bf9b
commit
103f53724f
@@ -21,7 +21,7 @@ mode ([mcp.md](mcp.md)) is a thin layer over this channel. Implementation:
|
||||
| `engine.commands` | — | Engine + UI commands: id, label, menu, shortcut, params doc, enabled |
|
||||
| `ui.menu.list` | — | Menu entries (flat: id, label, menu path, shortcut, enabled) |
|
||||
| `ui.menu.tree` | — | The menu bar as shown (File … Help): items `{id, params?, label, shortcut?, enabled, checked?}`, separators, submenus — the model behind the native macOS menu bar and the in-window menus |
|
||||
| `ui.inspect` | — | UI state, window, canvas/image rects, active photo, selection, perf, status, memory (bytes per cache, see `library.memory`; plus stage caches and textures), `export: {running: {total, done, current} \| null, last}` |
|
||||
| `ui.inspect` | — | UI state, window, canvas/image rects, `scroll: {grid, filmstrip}` (scroll offsets in points, `null` until drawn), active photo, selection, perf, status, memory (bytes per cache, see `library.memory`; plus stage caches and textures), `export: {running: {total, done, current} \| null, last}` |
|
||||
| `ui.widgets` | `{filter?}` | On-screen widgets `{id, rect: [x, y, w, h]}` (screen points) |
|
||||
| `ui.clickWidget` / `ui.dragWidget` / `ui.hoverWidget` | `{id, count?, fx?, fy?}` / `{id, toX?, toY?, dx?, dy?, steps?}` / `{id, fx?, fy?}` | Real egui input on a widget (hover: the pointer rests on it, e.g. for preset/profile previews) |
|
||||
| `ui.move` / `ui.click` / `ui.drag` | `{x, y, count?, button?}` / `{x, y, toX, toY, steps?}` | Raw pointer input, screen points |
|
||||
|
||||
Reference in New Issue
Block a user