Skip to content

Fixes #21594 and #21606 by gating on off_image geometry - #21648

Open
masterpiga wants to merge 1 commit into
darktable-org:masterfrom
masterpiga:mask_editing
Open

Fixes #21594 and #21606 by gating on off_image geometry#21648
masterpiga wants to merge 1 commit into
darktable-org:masterfrom
masterpiga:mask_editing

Conversation

@masterpiga

@masterpiga masterpiga commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Both issues stem from PR #21382 driving the clip/frame/coverage from the live viewport centre instead of the rendered backbuf position. I fixed them by gating the new geometry on off_image — whether the viewport is actually panned past the image, which the pan clamp only allows during off-image mask editing:

  • off_image == FALSE (all normal use): restores darktable's original clip (MIN(viewport,image) centred, never sits on the border → no grey seam) and original coverage test (measured against real zoom, so a drag that brings the border into view still re-renders to fill it).
  • off_image == TRUE (mask handle pushed off-image): keeps the new viewport-centre geometry it was introduced for.
  • The color-assessment frame is now always sized from the visible rect (image ∩ viewport) + border, so it can't grow across the grey background (Color assessment border grows over the gray background while zooming in #21594) — and this matches the original geometry in normal use.

Fixes #21594 and #21606.

@masterpiga

masterpiga commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator Author

@Macchiato17 and @jenshannoschwalm can you please verify that the fix works for your use case?

Note: the color assessment frame behaves differently when mask editing is ON, but this is by design, as you need to be able to access the mask nodes. When set to OFF, the behavior should be exactly as before the #21382.

@masterpiga masterpiga changed the title Fixes #21594 and #21606 by gating off_image geometry Fixes #21594 and #21606 by gating on off_image geometry Jul 27, 2026
@TurboGit

Copy link
Copy Markdown
Member

Note: the color assessment frame behaves differently when mask editing is ON, but this is by design, as you need to be able to access the mask nodes. When set to OFF, the behavior should be exactly as before the #21382.

Just a thought, maybe we should temporarily disable the color assessment mode when editing masks? Having both mode at the same time seems really not good to me and without real value.

@masterpiga

Copy link
Copy Markdown
Collaborator Author

@TurboGit I do not disagree in principle. However, the two functionalities are very disconnected in terms of UI, so users may be surprised to see color assessment switching off when mask editing is enabled. Also, it may be considered a regression wrt to the previous behavior, as the two modalities have been able to coexist before.

@ralfbrown ralfbrown added bugfix pull request fixing a bug scope: UI user interface and interactions labels Jul 27, 2026
@Macchiato17

Copy link
Copy Markdown
Contributor

@masterpiga I will be happy to test it on my side. Do you need a feedback prior to merging this PR into master?

@masterpiga

Copy link
Copy Markdown
Collaborator Author

@Macchiato17 the regressions are minor, so I would say that there is no rush to merge. Your feedback would be appreciated

@Macchiato17

Macchiato17 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

OK, so I checked with [e595eb7]: it's much better now, thanks for looking into it so quickly.
I still see a small remnant of the effect depending on the image ratio (see how the effect changes when I disable the applied crop). Please see the screen-cast:

screencast.mp4

This effect is even stronger, when using darktable not in full screen mode, but reduced to a window size with a more "flat" side ratio, somehow like cinemascope ;-) (I didn't capture that).

Or is - what I call a remnant - intended? When I read your text above
The color-assessment frame is now always sized from the visible rect (image ∩ viewport) + border
I'm not absolutely sure...

I also realized that there is a dark gray overlay on the right side reaching into the gray background, when expanding the crop module, but I don't know if this is also related to this issue here, or if that's a different thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix pull request fixing a bug scope: UI user interface and interactions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Color assessment border grows over the gray background while zooming in

4 participants