Commit Graph
11402 Commits
Author SHA1 Message Date
David Mann 3cc12bcb2b Merge pull request #12969 from Bobderto/codex/12936-bracket-size-steps
fix(engine): follow Photoshop bracket-key brush size steps
2026-11-10 22:14:13 +01:00
David Mann 72e17777bc Merge pull request #11170 from DingusMcRinkyDinky/warp-fold-layers
Warp: a fold shows what's under its transparent parts
2026-11-10 22:14:00 +01:00
David Mann e1d3ba223e Merge pull request #13000 from rmsff/fix/pen-menu-free-transform-label-12913
Pen menu: name the transform row after what it acts on
2026-11-10 21:47:01 +01:00
David Mann c76cc5b5ad Merge pull request #12998 from rmsff/fix/sharpen-refuses-indexed-12953
Sharpen: refuse Indexed Color and Bitmap documents
2026-11-10 21:46:48 +01:00
David Mann 6a9495c506 Merge pull request #12993 from ljkx/feat/pen-make-mask-button
Pen options bar: Make: Selection…, Mask, Shape — Mask adds a vector mask from the path (#12904)
2026-11-10 21:42:05 +01:00
David Mann 3dd36011ed Merge pull request #12984 from rmsff/fix/pen-enter-deselects-12892
Pen: Enter deselects the Work Path it finished
2026-11-10 21:41:51 +01:00
David Mann ecfa246f80 Merge pull request #12987 from Bobderto/codex/12881-pattern-stamp-origin
fix(paint): match unaligned Pattern Stamp origins
2026-11-10 21:21:56 +01:00
David Mann d6ead54a81 Merge pull request #12954 from rmsff/fix/object-selection-mode-refusal-12867
Object Selection: refuse Indexed Color and Bitmap documents
2026-11-10 21:21:45 +01:00
Michael Higginsandkayrockscreenprinting 6a676ee1be Save over a flat JPEG: JPEG Options, then in place; transparent ones offered as PNG (#2223)
Fixes #2223. Carries the in-place flat Save of #5865 (closed as superseded by this PR) and revives what #2515 (@kayrockscreenprinting, closed when its author stepped away) added beyond it.

File › Save now writes back over a flat file when that file still holds the document: one plain opaque layer the format can store, and only when the file held a single image. A JPEG (and a TIFF, Targa or DDS) asks its format options first, as Photoshop does; Cancel writes nothing. A JPEG whose lone layer has transparency it can't keep is offered as a PNG. Multi-image files (animations, multi-page TIFFs, multi-size icons, multi-part EXRs) still go through Save As; the source image count is kept through crash recovery.

Co-authored-by: kayrockscreenprinting <257643019+kayrockscreenprinting@users.noreply.github.com>
2026-11-10 20:26:48 +01:00
RickiNano 4258fc838f A click in a text field's padding focuses its editor (#12302) (#12400)
* A click in a text field's padding focuses its editor (#12302)

The shared text field's box sensed hover only, so a click in the outer
point of its 6 pt sides (past egui's 5 pt reach to the editor) did
nothing. The box now senses clicks (not focus, so Tab still stops on the
editor alone); since the editor sits on top, only padding clicks reach
it, and they focus the editor with the caret at the nearest point inside.

* Text field: the editor covers the box, so a padding click is its own (#12302)

The box sensing clicks and placing the caret itself broke on a scrolled
value: pressing the padding takes the focus from the editor, which then
scrolls back to the start before the click lands, so the caret went to
the wrong character. The editor now fills the box but the trailing space,
with the padding as its frame's inner margin, so egui handles a padding
click like any other: focus, caret, scroll, drag and double-click.

Tests from review: corner clicks (fail on main), an empty field, a
scrolled value, a disabled field, the trailing popup arrow keeping its
click, and the editor-click test no longer depends on glyph widths.
2026-11-10 20:08:39 +01:00
RickiNano 65bd584259 fix(ui): Reset Tool gives the Dodge tool a 65 px soft tip at 25 % spacing (#12684) (#12793)
fresh_brush gave the Dodge tool the plain 20 px hard default at 10 %
spacing. It now gets the reference's 65 px soft round at 25 % spacing
after Reset Tool and Reset All Tools, and on its first pick. The Burn
tool has the same measured tip, so both share TONING_TOOL_TIP.
2026-11-10 20:08:31 +01:00
RickiNano 4af62e8abb fix(ui): Delete on an anchor selected with Add Anchor Point removes it, not the layer (#12703) (#12796)
* fix(ui): Delete on an anchor selected with Add Anchor Point removes it, not the layer (#12703)

With the Add Anchor Point tool and one anchor selected (Ctrl+click), Delete
and Backspace fell through to Edit > Clear and deleted the active layer.
They now remove the anchor and its two segments, as in the reference
application: a closed subpath opens there. One history step, Delete Anchor
Point.

- vector: edit::delete_anchor_and_segments (a closed subpath opens at the
  anchor; an open one loses an end or splits at an inner anchor)
- engine: path.deleteAnchor takes "segments": bool (default false keeps
  joining the neighbours, as the tool's click does)
- ui: delete_key_deletes_anchor next to delete_key_deletes_work_path, and a
  Delete/Backspace branch before the work path's

* test(vector): Delete on one anchor of a closed two-anchor subpath leaves the other, open (#12703)

The kept anchor retains its handles and smooth flag, and the subpath keeps its path operation.
2026-11-10 20:08:21 +01:00
RickiNano 3e55928e63 Smudge Strength: alert when a typed value is out of range (#12982)
* fix(ui): Sharpen Strength alerts when a typed value is out of range (#12949)

With the Sharpen tool, Strength now takes whole numbers 1 to 100 and a
value typed past either end becomes the closest one with the "Closest
value inserted" alert, as the Blur tool's does since #12650. Smudge keeps
its silent clamp. The field edits a copy, so showing the Sharpen bar does
not round a fraction already in the shared Strength.

* fix(ui): Smudge Strength alerts when a typed value is out of range (#12962)

With the Smudge tool, Strength now takes whole numbers 1 to 100 and a
value typed past either end becomes the closest one with the "Closest
value inserted" alert, as the Blur (#12650) and Sharpen (#12949) tools'
do. All three tools now share one path through the field, which edits a
copy, so showing the Smudge bar does not round a fraction already in the
shared Strength.
2026-11-10 20:07:25 +01:00
David Mann 0d08cb7dd6 Merge pull request #6215 from davidmann4/feat/ui-217-4-columns-unit
Image Size: a Columns width unit from the Column Size preference (#6214)
2026-11-10 19:36:23 +01:00
rmsff a37665f4f3 Test the Pen menu's Free Transform row labels
Covers no path, a path being drawn, a closed path, a path that exists but
isn't active, and the unchanged Path Selection and Direct Selection menus,
on screen and in ui.inspect. Reuses the canvas tool menu test helpers (app,
choose_open, harness, right_click) instead of copying them.
2026-11-10 21:13:40 +03:00
rmsff 01a2a3455b Pen menu: name the transform row after what it acts on
The Pen's canvas menu now reads Free Transform (greyed) when the document
has no path, Free Transform Points while a path is being drawn, and Free
Transform Path on a finished path, as in the reference application. A path
that exists but isn't active keeps Free Transform Path, as do the Path
Selection and Direct Selection menus. ui.inspect lists the same label.
2026-11-10 21:13:40 +03:00
rmsff cbff770f0e Test the Sharpen tool's Indexed Color and Bitmap refusal
Makes the Dodge refusal tests' session, steps and pixels helpers
pub(super) and reuses them.
2026-11-10 21:03:11 +03:00
rmsff 3b5a62e75f Sharpen: refuse Indexed Color and Bitmap documents (#12953)
paint.sharpen and its live stroke fail with the reference application's
alert text, and a press with the Sharpen tool opens that alert, as the
Dodge tool does since #12686.
2026-11-10 21:03:11 +03:00
ljkxandClaude Fable 5.2 e530d6c9f4 Pen options bar: Make: Selection…, Mask, Shape; Mask adds a vector mask from the path (#12904)
Path mode now shows the caption "Make:" followed by Selection…, Mask and
Shape, all greyed without an active path. Mask runs
layer.vectorMask.fromPath on the path being drawn (finished first) or the
active path: one History step, Add Vector Mask, with the Background
turned into Layer 0 inside it.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 19:00:42 +01:00
FredApps 96581039a8 Merge main into feat/ui-217-4-columns-unit 2026-11-10 18:41:49 +01:00
David Mann 609e2aa727 Merge pull request #12883 from rmsff/fix/warp-split-default-thirds-12495
Warp: a one-way split on the Default grid keeps only the thirds across it
2026-11-10 18:38:59 +01:00
DingusMcRinkyDinkyandClaude 54ea149f2f Warp: working out a fold's order can't stall the thread pool
Tiles are drawn on the thread pool, and the first tile that meets a fold works
out the fold's order while the others that need it wait. The order's sort was
shared with the pool, so while the working thread waited for its halves the
pool could hand it another folded tile, which then waited for the order on the
same thread: the warp never finished. It needed some tiles folding and others
not, and showed about once in ten 24 MP warps on 16 threads.

The sort now runs on the working thread alone. It costs nothing measurable:
a 24 MP fold in stacking order takes 0.28 s, as before.

Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EZbgszHyuEuWAzxaamteuU
2026-11-10 18:36:10 +01:00
Dan ea771f39e0 fix(paint): match unaligned Pattern Stamp origins 2026-11-10 17:29:12 +00:00
rmsff a22cc8a525 Test Enter deselecting the Pen's Work Path 2026-11-10 20:11:07 +03:00
rmsff 901286fef3 Pen: Enter deselects the Work Path it finished
Enter now ends the path and hides the Work Path, as Make Selection does, so
the next path replaces it instead of joining it. Esc keeps it selected.
The #5702 Delete test now ends its path with Esc, which keeps it selected.
2026-11-10 20:11:07 +03:00
David Mann de7e1eec45 Merge pull request #12963 from RickiNano/fix/sharpen-strength-alert-12949
Sharpen Strength: alert when a typed value is out of range
2026-11-10 18:07:00 +01:00
David Mann 8a9bb9d1f4 Merge pull request #12966 from rmsff/fix/rasterize-prompt-history-name-12888
Rasterize prompt: a painting tool's type prompt adds "Rasterize Layer"
2026-11-10 17:49:11 +01:00
2ec3ecf243 Type: render a paragraph-box handle drag off the UI thread (#7032) (#12316)
* Type: render a paragraph-box handle drag off the UI thread (#7032)

While a box handle is dragged the document is left alone: each move
records the wanted box, a worker lays out (holding the shared text engine
only for layout) and rasterizes a copy of the layer, and the canvas shows
the document with the newest finished render. One render runs at a time
and the latest box wins. Releasing, committing or any other end of the
drag applies the box with the same type.edit as before, so the final
document and its single history step are unchanged. Without background
jobs (web, tests, scripts) every move still runs type.edit.

* Address review: end a box drag before other commands, on a stale preview and for Type Mask edits

- A command other than a view command (Free Transform, a menu item, a
  shortcut) applies the dragged box and ends the drag before it runs.
- A preview gone stale (the document changed some other way) ends the
  gesture instead of applying the press-time box over that change.
- Type Mask edits keep the synchronous drag: their overlay is drawn from
  the document's layout.
- apply_box keeps the stored size finite and documents its units.
- Tests: a width drag that rewraps, each of the above.

* Address review: Free Transform and Save mid-drag see the dragged box

UI_COMMANDS is every shell-handled command, not only view ones, so the
exemption skipped edit.freeTransform and file.save. Only view., window.
and help. commands now leave a box drag going. Adds a Free Transform test
and requires a box shape when the huge-box edit succeeds.

* Address review: the Free Transform test checks the command succeeds and its frame is the resized layer's

* Address review: only listed view commands leave a box drag going

view.clearSelectedGuides edits the document, so a prefix exemption for
view. commands let it make the preview stale and lose the dragged box.
The exemption is now an explicit list of commands that change nothing in
the document, and a test covers the guide command.

* Address review: switching documents, engine.execute and app.save end a box drag first

- window.* commands are no longer exempt: window.nextDocument and
  window.previousDocument switch documents mid-drag.
- The control channel's engine.execute (engine commands) and app.save
  bypass menus::invoke, so they end the drag themselves.
- Tests: a control engine.execute and app.save mid-drag, and a document
  switch mid-drag.

* Address review: panel toggles leave a box drag going

Opening or closing a panel (Cmd+T toggles the Character panel while
typing) only lays out windows, so window.panel.*, window.toggle.* and
type.panels.* no longer end a drag. A test covers three of them.

* Address review: doc comments on the functions this change touches

CodeRabbit's docstring coverage check was at 73.68% against 80%. Adds a
doc comment to each touched function that had none: the new helpers and
tests, and the existing functions this change edits.

---------

Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 17:38:56 +01:00
Khawar Zamman WaniandFredApps b0a4fdeeca Transform presets flip the targeted vector mask (#12283) (#12330)
* Fix targeted vector mask flips via path transform (#12283)

* Target vector masks explicitly in path transforms

A shape layer's path is its content, so path.transform's layer target
took the shape path even when the layer's separate vector mask was
targeted. Add an explicit vectorMask flag to path.transform and have the
Transform presets use it, leaving the shape path and cache alone.

The UI's vector-mask target now yields to an active alpha channel or
Quick Mask, and an explicit target in the params still wins. Add engine
and UI regressions for the shape-plus-mask case and undo/redo.

* test(ui): fix vector-mask target precedence fixture

* chore: restart CI after wasm-bindgen download timeout

* fix: respect vector mask locks and cover rotation presets

* fix: guard implicit vector mask path transforms too

---------

Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-10 17:38:49 +01:00
David Mann c797e56f67 Merge pull request #12951 from rmsff/fix/art-history-mode-mismatch-12826
Art History Brush: refuse a source of another colour mode
2026-11-10 17:37:05 +01:00
Dan f53ca628af test(engine): update dual-tip bracket resize expectation 2026-11-10 16:05:18 +00:00
Dan 73450ce23b fix(engine): follow measured bracket-key brush sizes 2026-11-10 15:57:10 +00:00
rmsff d25a4c6551 Tests: the rasterize prompt's history step name (#12888) 2026-11-10 18:48:09 +03:00
rmsff 841293ebe0 Rasterize prompt: a painting tool's type prompt adds "Rasterize Layer" (#12888)
OK on the type-layer prompt a painting tool raises now names the history
state its rasterize added "Rasterize Layer", as the reference application
does. Layer > Rasterize > Type keeps "Rasterize Type"; the shape, Smart
Object and fill prompts and the filter prompt are unchanged.
2026-11-10 18:48:09 +03:00
RickiNano 4ed948b01e fix(ui): Sharpen Strength alerts when a typed value is out of range (#12949)
With the Sharpen tool, Strength now takes whole numbers 1 to 100 and a
value typed past either end becomes the closest one with the "Closest
value inserted" alert, as the Blur tool's does since #12650. Smudge keeps
its silent clamp. The field edits a copy, so showing the Sharpen bar does
not round a fraction already in the shared Strength.
2026-11-10 16:38:36 +01:00
Khawar Zamman WaniandFredApps e1145b604e Make text-on-path placement editable (#11629)
* Add path text placement ranges and drag gestures

* Preview path placement and track bounded canvas damage

* Preserve legacy path anchors and show overflow markers

* Match path marker hit targets and directional cursors

* Fix path placement lint failures

* Cover path text body movement and position locks

* Keep open path text movable at range endpoints

* Target the type path after attaching text

* Fix path text range rendering and placement lifecycle

* Map vertical path text and preserve drag branch continuity

* Cover path placement lifecycle and preview damage regressions

* Preserve closest branch projection and fix CI regressions

* Normalize path endpoints and bind gestures to their viewport

* Simplify viewport ownership guards for Clippy

* Document path placement invariants and regression cases

* Fix path placement ownership, validation and geometry caching

* Correct path placement regression fixtures

* Ignore transient path geometry cache in UI state equality

* fix: allow path text flips with stale placement ranges

* fix: retain path text handles after shortening curves

* test: account for layer translation in path placement drags

* fix: mark path text range with x and o markers on the path

The beginning marker is an x and the end a small circle, both on the
path, with a plus in the circle while the range hides glyphs. The
cursor's triangle points right over the beginning, left over the end,
and both ways over the text body, which moves the whole range.
Direct Selection leaves an anchor or handle under a marker to path
editing; Path Selection always takes the marker.

* fix: resolve coincident path text markers by lap or drag direction

The x and o markers coincide on a closed path's full lap and on an
empty or end-clamped open range. A full lap now moves the whole text;
otherwise the first motion picks the beginning (backward) or the end
(forward). Marker fixtures press on the path, where the markers now
sit.

* fix: let either end of a full-lap path text range be dragged

Text attached to a closed path fills one lap, so its x and o markers
coincide and every press moved the whole text, leaving no way to
shorten the range. As the text begins just ahead of that point and
ends just behind it, a press ahead along the path now grabs the
beginning and one behind grabs the end; the point itself still moves
the whole text.

* test: check full-lap marker drags do not flip the text

* fix: read and write the path text range in PSD

Type on a path keeps its range in the Txt2 frame as /2 /6 [start end],
in curve-segment units with -1 for the default. Three reference-editor
files in ag-psd's test set fix the mapping: text-path ends a third into
the first segment and draws only "so" of "some text", and
text-path-26/27 move the start on an open path.

Import reads both ends (and the flipped flag) into the layer's start and
end. Export writes an open path whole with its start and end in the
range, instead of cutting the path at the start, and a closed path's
limited end as a range from its start. Path text in a document that
never came from a PSD now gets a Txt2 block, so its path is saved at
all, and the warning that the end limit is lost is gone.

* fix: let both selection tools grab a path text marker on an anchor

Direct Selection gave an anchor under a marker the click, so an open
path's default markers (on its end anchors) and a closed path's
coincident full-lap markers (on its first anchor) could not be moved
with that tool. In the reference editor either selection tool drags a
marker wherever the pointer shows the text bar with a triangle, so the
marker now wins for both tools.

The Direct Selection tests for reshaping a type path (#9114) drag its
last anchor, where the default end marker sits; they now end the
range short of it. To reshape at an anchor under a marker, drag the
marker off it or select the anchor with a marquee and nudge it.

* fix: keep explicit and empty path text ranges through PSD

An explicit end at the path's end stays explicit, so centered and right type keeps its alignment within the span. A closed range whose ends meet reads as empty, not as a full lap.

* ci: re-run checks after a download outage

* ci: re-run checks after a download outage

* fix: preserve legacy path text anchors through PSD

* ci: re-run checks against current main

---------

Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-10 16:28:51 +01:00
Khawar Zamman Wani b796e80fd4 Allow positioning linked Pattern Fill layers on the canvas (#12834)
* Add linked Pattern Fill positioning on the canvas

* Keep Pattern Fill input routing within CI lint limits

* Keep a Pattern Fill drag with the canvas that started it

A New Window view of the active document runs as a primary canvas
alongside the main one, each with its own pointer. The main canvas
ended a drag pressed in the window on the next frame because its own
button was up. The gesture now records the canvas it started on, and
only that canvas routes its moves or ends it.
2026-11-10 16:27:22 +01:00
Khawar Zamman Wani c616c77002 Speed up adjustment previews for unstyled clipped raster layers (#12356)
* Preview adjustments on clipped raster layers in isolation

* Measure clipped adjustment previews and fix test lint

* Match styled preview benchmark to canvas proxy eligibility

* Keep styled clipped previews off the UI thread

* Address preview benchmark reporting and regression coverage review

* Document benchmark reporting regressions

* Document benchmark setup and isolated fixture execution
2026-11-10 16:26:38 +01:00
rmsff 81639ef0a1 Test Object Selection's Indexed Color and Bitmap refusal 2026-11-10 18:25:49 +03:00
David Mann 6d1ea6aaf7 Merge pull request #12924 from rmsff/fix/delete-anchor-options-bar-text-12827
Delete Anchor Point: options bar says the tool has no options
2026-11-10 16:19:21 +01:00
rmsff 67f865695e Object Selection: refuse Indexed Color and Bitmap documents
select.object (rectangle and point) returns the reference application's
alert text in these two modes and leaves the selection and History alone;
a click or drag with the tool opens that alert with OK instead of running.
2026-11-10 18:19:15 +03:00
David Mann bd79596bb3 Merge pull request #12911 from hectorviov/fix/ruler-escape
Ruler: Escape during a drag ends it and keeps the ruler (#11986)
2026-11-10 16:19:11 +01:00
rmsff 9106acf5d2 Test the Art History Brush colour mode refusal at 8 and 16 bits 2026-11-10 18:17:25 +03:00
rmsff 5989757980 Art History Brush: refuse a source of another colour mode
After Image > Mode the source state from before the change was converted
and painted; Photoshop refuses it. Compare the document modes, not the
pixel formats, which read Indexed and Multichannel as RGB. A bit depth
change still converts. The History Brush keeps its behaviour (#12842).
2026-11-10 18:17:25 +03:00
RickiNano 3af373a82f test(ui): time the Liquify Alt-twirl strokes explicitly (#12697) (#12712)
alt_with_twirl_clockwise_twirls_counterclockwise sent both strokes
through pointer(), which reads the wall clock. A held twirl's strength
is the elapsed time, so the plain and Alt runs could differ by more than
the 5 % the test allows on a slow runner. Both now go through pointer_at
at the same fixed times.
2026-11-10 16:11:00 +01:00
David Mann 7a866ff797 Merge pull request #12903 from rmsff/fix/type-mask-placeholder-12072
Start Type Mask text with the placeholder, as the Type tool does
2026-11-10 15:51:49 +01:00
David Mann 9b7a9aabe3 Merge pull request #11490 from Raghav2012Code/feat/crop-options-bar-details
Crop: Straighten gets its label and a spirit-level glyph (#10888)
2026-11-10 15:51:29 +01:00
David Mann 4651f92874 Merge pull request #11711 from yoriswind/codex/move-selection-11102
Fix Move Auto-Select toggling and locked-layer clicks (#11102)
2026-11-10 15:51:07 +01:00
David Mann 16d091c522 Merge pull request #12894 from rmsff/fix/warp-handles-always-visible-12497
Warp: show the Default grid's handles and split-grid anchors without hovering
2026-11-10 15:45:41 +01:00
David Mann 0e256a90fa Merge pull request #12873 from rmsff/fix/remove-cursor-centre-cross-12550
Remove tool: show the centre + in its brush cursor by default
2026-11-10 15:45:26 +01:00