[Feature]: Duplicate Multi View Zoom / Pan #57

Closed
opened 2026-06-12 06:59:41 +00:00 by ValleyGeek · 5 comments
Owner

Problem or use case

Allowing the set of images in the duplicate workbenche's multi view to zoom and pan in tandem

Proposed solution

In the duplicate workbench's multi view, allow any image to be zoomed and panned while hovering over it. Apply the zoom and pan to all the images in the view, keeping each within their own scene area so they don't overlap when zoomed or panned. Effectively creating a seamless small scene for each image displayed allowing for close up inspection of all at one. Zooming needs to be applied relative to each image to keep the displayed size equivalent so that small images and large images in the viewer scale proportionately to keep the same part of the image displayed rather a fixed percentage across the set making them scale disproportionately.

Alternatives considered

No response

### Problem or use case Allowing the set of images in the duplicate workbenche's multi view to zoom and pan in tandem ### Proposed solution In the duplicate workbench's multi view, allow any image to be zoomed and panned while hovering over it. Apply the zoom and pan to all the images in the view, keeping each within their own scene area so they don't overlap when zoomed or panned. Effectively creating a seamless small scene for each image displayed allowing for close up inspection of all at one. Zooming needs to be applied relative to each image to keep the displayed size equivalent so that small images and large images in the viewer scale proportionately to keep the same part of the image displayed rather a fixed percentage across the set making them scale disproportionately. ### Alternatives considered _No response_
Member

Implemented on branch 0.1.45/issue-21-57-67-dupe-workbench-depth (chained off the previous dev branch, not merged to main yet).

Each comparison tile in the Multi view now renders through its own QGraphicsView/QGraphicsScene instead of a plain scaled QPixmap, giving every image its own clipped "scene" as you described. Scrolling the mouse wheel over any image zooms it; dragging with the middle mouse button pans it — both gestures broadcast a relative delta (a multiplicative zoom factor, or a fraction of that tile's own scrollbar range) to every other tile in the group, so they all zoom/pan in lockstep. Each tile establishes its own 1.0x baseline via fitInView, and since the broadcast is relative rather than an absolute pixel/scale value, small and large images in a group stay scaled proportionately to each other rather than drifting apart — e.g. zooming in 15% always means 15% relative to each image's own fitted size.

Panning uses the middle mouse button rather than left-drag specifically so it doesn't collide with the existing left-click ("keep this one, mark others DELETE"), double-click (open Single viewer), and right-click ("mark this one DELETE") gestures already on these tiles. Zoom never goes below each tile's own fit-to-cell size, so you can't shrink an image smaller than its cell.

Bundled with #67 and #21 in the same branch/PR.

Implemented on branch `0.1.45/issue-21-57-67-dupe-workbench-depth` (chained off the previous dev branch, not merged to `main` yet). Each comparison tile in the Multi view now renders through its own `QGraphicsView`/`QGraphicsScene` instead of a plain scaled `QPixmap`, giving every image its own clipped "scene" as you described. Scrolling the mouse wheel over any image zooms it; dragging with the **middle mouse button** pans it — both gestures broadcast a relative delta (a multiplicative zoom factor, or a fraction of that tile's own scrollbar range) to every other tile in the group, so they all zoom/pan in lockstep. Each tile establishes its own 1.0x baseline via `fitInView`, and since the broadcast is relative rather than an absolute pixel/scale value, small and large images in a group stay scaled proportionately to each other rather than drifting apart — e.g. zooming in 15% always means 15% relative to each image's own fitted size. Panning uses the middle mouse button rather than left-drag specifically so it doesn't collide with the existing left-click ("keep this one, mark others DELETE"), double-click (open Single viewer), and right-click ("mark this one DELETE") gestures already on these tiles. Zoom never goes below each tile's own fit-to-cell size, so you can't shrink an image smaller than its cell. Bundled with #67 and #21 in the same branch/PR.
Author
Owner
  • When loading the duplicates workbench, images are no longer scaled to 'fit' their scene by default, which should be their starting state
  • The red outline denoting deleted images is no longer visible in the multi view. During the fix, make the border 1px wider than it had been and a slightly brighter red color. Make it a dashed line as well if possible.
  • Clicking and dragging with the left mouse button instead of the middle mouse button would be preferred.
    • Click once to denote 'keep'
    • Double click for image viewer
    • click-and-hold to pan
- When loading the duplicates workbench, images are no longer scaled to 'fit' their scene by default, which should be their starting state - The red outline denoting deleted images is no longer visible in the multi view. During the fix, make the border 1px wider than it had been and a slightly brighter red color. Make it a dashed line as well if possible. - Clicking and dragging with the left mouse button instead of the middle mouse button would be preferred. - Click once to denote 'keep' - Double click for image viewer - click-and-hold to pan
Member

Addressed all three, pushed to 0.1.47/issue-111-86-64-89-feedback-fixes (0.1.54):

  • Fit on load: images now correctly fit their tile as soon as a duplicate group loads. The view was calling fitInView() against whatever size it happened to have before the widget tree had gone through layout — it now also re-fits on every resize while still at the 1.0x baseline, so it self-corrects once its real size is known.
  • DELETE border invisible: root cause was the zoom/pan change itself — the border was drawn by the host widget's own paint method, which runs beneath its children in Qt's stacking order, so the new QGraphicsView painted over it every frame. Replaced it with a transparent overlay that's explicitly kept on top. Also made it 1px wider, a brighter red, and dashed, per your request.
  • Left-click-drag pan: panning is now click-and-hold-drag with the left button instead of the middle button. A quick click (below a small movement threshold) still reaches the existing "mark others DELETE" action; double-click still opens the Single viewer.

Test coverage added for all three (fit-on-resize, overlay z-order, click-vs-drag distinction). Let me know how it looks on a real run.

Addressed all three, pushed to `0.1.47/issue-111-86-64-89-feedback-fixes` (0.1.54): - **Fit on load**: images now correctly fit their tile as soon as a duplicate group loads. The view was calling `fitInView()` against whatever size it happened to have *before* the widget tree had gone through layout — it now also re-fits on every resize while still at the 1.0x baseline, so it self-corrects once its real size is known. - **DELETE border invisible**: root cause was the zoom/pan change itself — the border was drawn by the host widget's own paint method, which runs *beneath* its children in Qt's stacking order, so the new `QGraphicsView` painted over it every frame. Replaced it with a transparent overlay that's explicitly kept on top. Also made it 1px wider, a brighter red, and dashed, per your request. - **Left-click-drag pan**: panning is now click-and-hold-drag with the left button instead of the middle button. A quick click (below a small movement threshold) still reaches the existing "mark others DELETE" action; double-click still opens the Single viewer. Test coverage added for all three (fit-on-resize, overlay z-order, click-vs-drag distinction). Let me know how it looks on a real run.
Author
Owner

Replicate the new dashed border styling to the image viewer and carousel for consistency

Replicate the new dashed border styling to the image viewer and carousel for consistency
Member

Verified — closing.

Verified — closing.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ai-collab/bulk-image-organizer#57
No description provided.