PhotoCraft: An open-source, photo editor written by scratch in pure Rust
Merge main into feat/zoom-animation-566
Gustavo Ziger1334534e103e
diff --cc crates/ui-egui/src/canvas.rsindex 45f80a069,a5f1452dd..8474d0594--- a/crates/ui-egui/src/canvas.rs+++ b/crates/ui-egui/src/canvas.rs@@@ -2991,31 -3031,9 +3081,33 @@@ pub fn canvas_view(app: &mut Photocraftcrate::monitor_status::check_window(app, &ctx);}let full = rect;- let rect = if primary { crate::rulers::content_rect(app, rect) } else { rect };+ // Every document view has its rulers, the tiles of Window › Arrange and floating windows+ // too, as in Photoshop (#6017).+ let rect = crate::rulers::content_rect(app, rect);+ // Both wheel reads share one owner so snap-zoom input is accumulated only once per frame.+ let wheel_owner = ui.id().with(("canvas-wheel", idx));+ // Direct navigation starts from the authoritative camera. This also means a click or drag+ // never maps through a camera that is still moving under the pointer.+ let (pointer_here, hover_here) = ctx.input(|i| {+ (+ (i.pointer.any_pressed() || i.pointer.any_down()) && i.pointer.press_origin().is_some_and(|p| rect.contains(p)),+ i.pointer.hover_pos().is_some_and(|p| rect.contains(p)),+ )+ });+ let direct_input = pointer_here+ || (hover_here+ && crate::wheel_nav::read(+ &ctx,+ app.session.prefs().general.zoom_with_scroll_wheel,+ app.session.prefs().enhanced_controls.zoom_with_trackpad_pinch,+ wheel_owner,+ hover_here,+ )+ .is_some());+ if direct_input {+ view.zoom_animating = false;+ view.zoom_anchor = None;+ }let doc = app.session.documents()[idx].doc.clone();let size = [doc.size.width, doc.size.height];if view.doc_size != size {diff --cc crates/ui-egui/src/panels.rsindex 860b5b7e4,f2961fd7b..b19fec6f3--- a/crates/ui-egui/src/panels.rs+++ b/crates/ui-egui/src/panels.rs@@@ -1954,10 -1970,11 +1984,13 @@@ fn navigator(app: &mut PhotocraftApp, u{let d = (pp - rect.min) / s;app.ui.views[idx].center = [d.x.clamp(0.0, size.width as f32), d.y.clamp(0.0, size.height as f32)];+ app.ui.views[idx].zoom_animating = false;+ app.ui.views[idx].zoom_anchor = None;app.ui.views[idx].fit_pending = false;}+ if command && resp.hovered() {+ ctx.set_cursor_icon(egui::CursorIcon::ZoomIn);+ }// The Navigator has its own zoom target: an unmodified wheel over the preview// should zoom even when the document canvas is configured to scroll on wheel.// Use the canvas wheel classifier to honour one ×1.1 step per notch withoutdiff --cc docs/scorecard.mdindex 8c4fc8ab7,3b36e7c61..e7954a5b4--- a/docs/scorecard.md+++ b/docs/scorecard.md@@@ -9,10 -9,10 +9,10 @@@ Generated by `cargo xtask scorecard` fr| [Performance](#performance) | 3 | 22 | 24 | 58 scenarios: 3 within budget, 22 over budget or failing, 9 tracked only, 19 not run, 5 not measurable yet (baseline 2026-10-05) || [File compatibility](#file-compatibility) | 7 | 14 | 6 | io corpus: oracle ≥ 148/170, round trip ≥ 169/170; psd-tools corpus: oracle ≥ 249/309, round trip ≥ 308/309; photoshop oracles: oracle ≥ 188/256, round trip ≥ 258/256 || [Tools](#tools) | 33 | 11 | 0 | |-| [Workspace and UI](#workspace-and-ui) | 13 | 6 | 4 | settings that do nothing: 26 of 168 (target 0) |+| [Workspace and UI](#workspace-and-ui) | 13 | 6 | 4 | settings that do nothing: 25 of 168 (target 0) || [Type](#type) | 4 | 3 | 2 | || [Automation](#automation) | 5 | 2 | 4 | 631 of 631 menu items live (100.0%) |- | [Reliability](#reliability) | 5 | 2 | 0 | never-crash lints on 29 of 29 crates; panic_hunt present |+ | [Reliability](#reliability) | 5 | 2 | 0 | never-crash lints on 30 of 30 crates; panic_hunt present || [Distribution](#distribution) | 5 | 4 | 2 | || [Open bugs](#open-bugs) | 29 | 2 | 1 | |