Let a zoomed view fill the viewport rather than keep the photograph's shape

The view was the same fraction of each axis, so it kept the frame's
aspect at every zoom: a portrait zoomed on a landscape screen stayed a
portrait strip with the screen's sides empty. Each axis now shows as
much of the frame as the viewport holds at that magnification, capped
at the whole frame, and the render is fitted to the viewed region
rather than to the frame. A redraw re-cuts a zoomed view about its
centre when the viewport or the crop changes shape.
This commit is contained in:
2026-10-02 22:29:48 -04:00
parent d5c93ae795
commit 0b06e31bf3
6 changed files with 239 additions and 71 deletions
+9
View File
@@ -2180,6 +2180,15 @@ fn build_render_now(
steps.set_snapshots(slint::ModelRc::new(slint::VecModel::from(snapshots)));
}
// TRACES: FR-UI-4
// A zoomed view keeps the viewport's shape through a resize or a
// crop that changes the frame's. First, because the overlays
// below are placed against the view this may re-cut.
{
let (vw, vh) = *viewport.borrow();
s.shape_view_to(vw, vh);
}
// TRACES: FR-DEV-3
// Which part of the region overlay the view is showing. Here
// rather than in the panel's own sync because a pan or a zoom