The position took one length; Photoshop's field evaluates + - * / over mixed
units ("100% / 3", "100% - 50px", "1in + 10"). Unit::eval_length does that
for view.newGuide / view.moveGuide: * and / bind tighter, a bare number added
or subtracted takes the first operand's unit (as Photoshop's "1in + 10" is
11 in), a bare multiplier is a number. New Guide's dialog gives a leading bare
number the ruler unit, as it does a lone one.
Fixes#10440
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The remaining commits of the stack, applied on top of the squash-merged #10147:
- PNG decodes in resumable steps of rows (PngDecodeRows, shared with decode_rows)
- PNG imports as a document in resumable steps (io PngImport, text metadata and
document build in bounded steps)
- Jobs can run a slice at a time where there are no threads (StepWork,
cooperative sessions, Session::poll_jobs)
- Place decodes, flattens and resizes in slices (PlaceSteps), reading a path
and keeping the frame, memory gate and typed memory-budget errors main has
- The web build places dropped and picked files a slice per frame, with a
bounded place inbox
- A measurement of the stepped place; docs for jobs without threads
Main's Lab bounds (#10765) refuse RGB samples, subtractPoints and order
included. A test pins that for subtractPoints and order, and panic_hunt
now sends malformed and far-off subtractPoints, points and click orders,
also with Lab bounds, to every command.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The several-samples test only checked pixels the samples cover fully or not
at all, so thresholding the coverage at 0.5 passed it. A lighter red at the
edge is covered about 0.45 by Select > Color Range for the same clicks;
Replace Color must give the blend of its colour and its fully replaced
colour at that coverage.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every test with `order` used the default grouping (all additions first), so
dropping `order` from the keys forwarded to the Color Range matcher failed
none. `+ - +` on the grey strips subtracts while the box is the dark grey
alone, so the light grey added after it is matched; the test checks Replace
Color changes exactly what Select > Color Range covers for those clicks.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The multi-sample test undid without looking at the result. It now
compares the whole layer with the pixels from before, after two added
samples and after an added and a subtracted one. Applying the edit as
two history steps makes it fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two creams sampled in two places with Range 20 %: each is replaced near
its sample, the same cream far from both is left alone, and Select ›
Color Range covers the same pixels. Not forwarding `localized` to the
multi-sample matcher makes it fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The subtraction checks subtracted a blue that never matched the red
sample at fuzziness 40, so "blue stays" held with or without
`subtractPoints`. The new test adds a dark and a light grey and subtracts
a grey near the light end: as in Photoshop the light edge of the Lab box
moves onto the subtracted grey, so the light grey is no longer replaced,
and Select › Color Range agrees. Ignoring `subtractPoints` makes it
fail. The old checks now say why blue stays, and a doc comment that sat
on the wrong test is moved back.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replace Color had one eyedropper and matched one colour. As in Photoshop, its
dialog now has the Eyedropper, Add to Sample and Subtract from Sample tools
(Shift-click adds, Alt-click subtracts), and image.adjustments.replaceColor
takes several points, subtractPoints and their click order. Several samples
match through Select › Color Range's own matcher, so the two agree for the
same clicks; a single colour keeps the existing path.
Fixes#6280
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- #11458: the straight-crop rows also check that the active layer's pixels
inside the old canvas are the plain crop's, so a fill that recolours them
fails.
- #11295: the Esc case sends the key through shortcuts::handle instead of
calling cancel directly.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test accepted an added Nudge step; layer.translate records nothing for
a zero offset, so require unchanged entries.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolve conflicts in widgets/dropdown.rs (union of imports: main's
grouped dropdown separator and the menu scroll arrows' pos2) and
widgets/tests.rs (keep both the menu scroll arrow tests and main's
grouped dropdown test).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- #11500: a filter that matches no layer draws no row, so the empty-area
right-click was never created; the whole empty list now takes it.
- #11532: flipping the pen to its eraser end is a tool switch, so Add New
Artboard's placing mode ends as with any other switch.
Tests for both (the Layers one fails without the fix).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- menus/parity.rs: #11503 lowered FLOOR to 658 (two Warp rows went);
with #11497's two entries the batch has 660 live again.
- #11443: a nudge that changed nothing (zero offset) no longer renames
the state on top to "Nudge".
- #11295: a handle drag remembers its tool and ends on any tool switch,
also to another tool that shows the box; the release of a drag that was
just dropped is consumed instead of reaching the new tool; the box is
drawn only over the active document's view.
Tests for each (both new UI tests fail without their fix).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
In the app (background jobs on) edit.transform runs as a job and lands
after app.run returns, so renaming the top History step to "Transform
Path" right away renamed the step before it (the second shape's "New
Shape Layer") and left the scale as "Free Transform". Found in the batch
smoke run; the PR's tests run with background jobs off.
edit.transform now takes stepName "Transform Path" (any other name is
refused, as select.transformSelection's stepName from #11444), and the box
passes it instead of renaming afterwards. New tests: the box with
background jobs on (fails without the fix), and the parameter.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The arrows were taken from the room and then the scroll area was raised
back to the 120 pt minimum, so with 120-148 pt of room the menu grew 28 pt
taller than the room and the lower arrow could fall off screen. The
minimum now applies to the whole menu, arrows included.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>