With Other Cursors set to Standard (or Precise swapped by Caps Lock) the
Magnetic Lasso showed a plain crosshair. The reference application shows
the tool's icon with its hotspot on the lasso's top-left tip; the Width
circle stays on the precise side.
Co-Authored-By: Hector Villarreal <1501713+hectorviov@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On 8-bit RGB a pixel now matches the clicked colour when the spread of
{0, dR, dG, dB} is within the Tolerance, so opposite changes in two
channels count double and green and blue stay at Tolerance 255. The
anti-alias fringe uses the same distance. The Magic Wand, the Paint
Bucket and other modes and depths keep the per-channel limit.
Measured on #11887: smoothing doesn't apply to a Shift-click line, whatever
Smoothing and Catch-up on Stroke End are set to. With Catch-up on Stroke End
now off by default, the smoothed line stopped short of the click. A
Shift-click drag sends `smoothing: 0` with its stroke params; the options
bar's Smoothing is untouched.
Smoothing::default() now has catch_up_on_end: false, so after Reset Tool
a smoothed stroke ends short of the release point unless the option is
turned on. Tests that relied on the old default set it explicitly.
The hover highlight filled the footer button with the opaque hover colour over the icon. It is
now a 1.5 px accent outline. control-protocol.md's Actions panel paragraph mentions the two drags.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove and wrote
Instead of turning Anti-alias off, the tests keep the default setup and
expect the reference application's measured results (#11776, #11779):
the selection ends at 381, Subtract at 219, Intersect runs 219-381.
Suggested by hectorviov on #12399.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Actions panel rows carried a drag payload that only the reorder drop understood, so dropping a row on the footer trash or on Create new action did nothing. The footer buttons now take the drop (the trash deletes the dragged row, the plus duplicates it right after itself) through shared delete_row and duplicate_row helpers that also keep the selection and disclosure rows right, with a hover highlight and the same recording rules as the buttons. Tests drive real pointer drags for step and action rows onto both buttons, a drop on empty space, and a drop on the trash while recording.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove and briefed; Sonnet 5.5 wrote at medium
Only the doc status lines, histories and raw tables conflicted. The
status lines take main's with the #7377 entry kept first; histories keep
both sides. The RAF table row keeps this PR's compressed support next to
main's new Hasselblad 3FR row and its sidecar status, and points at the
moved test file tests/it/raf.rs. The Camera RAW row keeps main's 3FR and
Nikon text and no longer lists compressed RAF as open.
Co-Authored-By: Yorgos S. <smyrgeorge@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#12146 gives near-matching neighbours a soft fringe when Anti-alias is on.
The #11848 tests left Anti-alias at its default and expected exact column
bounds, so main's engine tests failed (381 instead of 380).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
main brought the graded erase (#11901), decontamination (#11902) and graded
Find Edges (#11904) into bg_erase.rs, and kept Protect Foreground Color on the
largest per-channel difference to the foreground. Resolved by narrowing the
Tolerance itself: with protection on, graded_weight runs on min(Tolerance,
distance from the sample to the foreground); a foreground equal to the sample
erases nothing. This replaces the distance stretch from before the merge.
Measured in the reference application with the issue's drag, foreground off in
two channels: (100,140,40) gives 0 32 75 112 156 196 238 255 (no protection),
(150,90,40) the block-5 row, (230,90,40) and (200,90,70) a Tolerance of 50
levels. So the narrowing uses the sample-match distance (largest increase plus
largest decrease), not the largest per-channel difference: the test on main
that kept the sampled colour for a two-channel foreground is replaced by these
rows. The reference rows of #11903 now match within 8 levels, 8- and 16-bit.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Structure and Color open a whole-number slider. A typed value outside the range
opens an OK alert and keeps the closest value. While the Transform On Drop box
is up, the bar is greyed and Cancel then Commit sit at the right end.
Fixes#12193
On a transparency-locked layer with a colour-channel target, the live
preview mixed the dabs back with the lock (straight mix) while the commit
mixes premultiplied without it, so at 32 bits partly transparent pixels
rounded differently in the preview. The channel branch now builds the
LiveDab unlocked and pushes the points afterwards, as the RGB branch does.
The test now runs at 8, 16 and 32 bits over a half-transparent strip at
half opacity; it failed at 32 bits before the fix.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The review on #11853 noted that the tests checked only that a selection
row's label did not start with "Count", never tested `auto` choosing a
selection, never tested a ruler row, and read only the first row. Now
each record must give exactly one row, the selection and ruler rows must
be "Measurement N", `auto` with a selection must stay "Measurement N",
and the shared counter is checked across all three sources.
Co-Authored-By: DuBearte <DuBearte@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Angle field took any frame's scroll delta for a wheel step. That was wrong both ways: a
focused field's wheel is taken out of the frame before layout, so its steps past 180 showed the
range alert, and a view scroll arriving with typed text suppressed the alert (CodeRabbit). The
field now asks field_wheel whether it was handed wheel notches, and only an entry made with the
field's focus can alert.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A fresh start and Reset Tool leave the checkbox on, so a drop shows the
scale and rotate box. Enter still commits and Escape still cancels. A
saved false stays off, and a missing key takes the new default. A plain
move still sends paint.contentAwareMove with no scale or rotate.
Fixes#12185
Review follow-up. A pixel counts as selected exactly when the selection's
coverage8 stores it nonzero: the least such coverage is found once by
bisecting the f32 bits, so the scan stays one compare per pixel.
The scan no longer costs more than the select.lasso it replaces: strips
start at 64 rows and double up to about 4 MP, and each strip is checked
in parallel, branch-free blocks (sequential on wasm). A corner-to-corner
line on 7360 x 4912 now takes 25-32 ms (was 65-73 ms; select.lasso took
23-27 ms). A lasso that selects is still answered after the first strip.
Adds a test for a lasso over pixel centres with Anti-alias off.
Review follow-up. The check rasterizes the lasso as select.lasso does
(polygon_window over the canvas, kept from 1/255 as the selection stores
it) instead of a half-pixel area threshold. A tiny anti-aliased lasso that
covers part of a pixel selects it as before, and a thin lasso between
pixel centres without anti-aliasing now warns instead of adding an empty
Lasso step. Only the lasso's bounds are rasterized, 64 rows at a time,
stopping at the first selected pixel.
The Don't show again test now checks what reaches the preference store
and that a restart reads it back.
With no selection, a Content-Aware Move drag that encloses no area (a
click or a straight line) now opens the alert "No pixels are selected."
with OK and "Don't show again", instead of silently running select.lasso
on an empty polygon. No History state is added and nothing is selected.
A drag that encloses an area, a drag with a selection, and the Lasso tool
keep their behaviour.
"Don't show again" is a small reusable addition to the app's Error alert
(dialogs/dont_show_again.rs): the alert carries the dialog-preference key
it sets, and closing it with the box ticked keeps {"skip": true} there.
Fixes#12192