Commit Graph
11425 Commits
Author SHA1 Message Date
David MannandClaude Opus 5.5 17881fc2ad Merge main into fix/mask-from-transparency-bg-depth
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 01:53:57 +02:00
David MannandClaude Opus 5.5 a8db6dd100 Export As: Resample menu, incl. Nearest Neighbor (#5838)
Before this change, Export As always resampled the exported copy with Bicubic, and the preview
used Bilinear. Pixel art and screenshots could not be enlarged with hard edges. Photoshop's
Export As has a Resample menu next to Width/Height/Scale for this.

- engine export_preset_cmds: RESAMPLE lists Photoshop's six choices (Bicubic Automatic, the
  default, then Bicubic, Bicubic Smoother, Bicubic Sharper, Bilinear and Nearest Neighbor)
  and export_resample() checks a value. An unknown value is now an error. Before, Image Size
  quietly treated it as Bicubic.
- Export presets save and restore resample. Older presets load with the default.
- layer.exportAs takes a `resample` param, checked even at 100 %.
- Export As dialog: a Resample dropdown under Image Size. It is remembered with the other
  settings, and a bad saved value falls back to the default. export_document passes the
  choice to image.imageSize for the exported copy only.
- Preview: the proxy keeps its fast Bilinear path, except for Nearest Neighbor, which is
  just as cheap and is what the user wants to see. The preview texture also uses NEAREST
  magnification then, so small exports look blocky instead of blurred.
- Translations for the three new labels in all 20 catalogues.
- Scorecard FILE-215-18 is now done. Also fixes a stale doc comment on VectorMask::feather,
  because the compositor does feather vector masks.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 01:53:42 +02:00
Gustavo Ziger c62b355908 fix(automation): document ui.set layer filter 2026-10-14 20:51:08 -03:00
Michael Higgins 0f75495246 Merge branch 'storytold:main' into fix/5799-batch-same-format-raw 2026-10-14 19:50:22 -04:00
Gustavo Ziger 9724295a4e Merge remote-tracking branch 'origin/main' into feat/zoom-animation-566 2026-10-14 20:48:39 -03:00
David MannandClaude Opus 5.5 3744dfe887 Merge main into fix/5495-dropdown-height
Keep both sides of dropdown_with: the list opens through combo_list (#5495),
with main's translate flag and its labels computed once (dropdown_literal, #5335).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 01:44:54 +02:00
David Mann aa98805877 WIP: PSD: Frame layers keep their stroke (#4381) 2026-10-15 01:30:16 +02:00
Higgs32584andClaude Opus 5.5 772209808b Pen options bar: Make Selection in Path mode (#5703)
Photoshop's Pen options bar in Path mode offers "Make: Selection…". PhotoCraft
had it only on the canvas's right-click menu. The options bar now has a Make
Selection button (enabled when there's a path) that opens the same dialog for
the path being drawn, finished into the Work Path first, or the active path.
"Make Selection" gains its zh-Hans, zh-Hant and ko catalog rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 19:30:05 -04:00
Vikram Bhaskaran 21a9d13431 Prevent clipboard centering from overflowing document coordinates. 2026-10-15 10:23:24 +11:00
David MannandClaude Opus 5.5 f471db33a7 Merge main into fix/video-fps-validate
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 01:22:42 +02:00
Vikram Bhaskaran ef449e2d8a Merge remote-tracking branch 'origin/main' into feat/iff-read
# Conflicts:
#	docs/gaps.md
2026-10-15 10:21:58 +11:00
David MannandClaude Opus 5.5 8003f3b20a Merge main into fix/adjust-smart-object-locks
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 01:19:31 +02:00
Higgs32584andClaude Opus 5.5 b153c4e74e Menus: Chinese, Japanese and Korean labels get access keys, "文件(F)" (#5863)
Mnemonics (#4988) were assigned from the label as shown, so a label with no
Latin letter had none and its menu couldn't be opened with Alt+letter. Such a
label now shows its English label's letter in parentheses, before a trailing
ellipsis ("文件(F)", "新建(N)…"), and takes it as its mnemonic, as Windows
menus do in those languages. English and other Latin-script menus are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 19:18:26 -04:00
Higgs32584andClaude Opus 5.5 d86069c039 Preferences: old settings files take Shift-to-switch-tools on (#5647)
#3528 made Preferences > Tools > Use Shift Key for Tool Switch on by default,
as in Photoshop, but every settings file written before stores the old
default (off), so upgraded installs kept cycling a tool group on each press
of its letter. Files before version 2 now load with the new default; saves
write version 2, so a later explicit "off" is kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 19:13:01 -04:00
Tanish Manku 7bb10a7759 style: rustfmt five files on main (fmt break from #5448, #5670, #5135) (#5873)
Formatting only; cargo fmt --all -- --check passes again.
2026-10-14 16:11:18 -07:00
David MannandClaude Opus 5.5 22c0351ffc Merge main into fix/count-delete-group-active
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 01:10:54 +02:00
David MannandClaude Opus 5.5 e333c9c4be Merge main into perf/p33-cmyk-dab
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 01:03:29 +02:00
David MannandClaude Opus 5.5 91bffdec0b Merge main into feat/tool-213-7-live-retouch
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 00:57:30 +02:00
Higgs32584andClaude Opus 5.5 2750809257 Batch: Format "Same" saves camera raws as PSD instead of failing (#5799)
With Format "Same" every output took its input's extension, so a folder of
ARW/CR2/NEF/DNG files tried to write raws, which PhotoCraft can't, and every
file failed. Raws and other import-only inputs (PDN, Krita, Affinity) are now
saved as PSD; other inputs keep their format.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 18:56:28 -04:00
Higgs32584andClaude Opus 5.5 b54a4a8f86 Displace: OK asks for the displacement map, as in Photoshop (#5806)
Filter > Distort > Displace took its map only from an open document or a
path typed into a text field; OK without either ran with no map, and no file
picker ever appeared. Confirming the dialog with no map now opens the file
picker and runs Displace with the chosen file (smart filters included);
Cancel applies nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 18:54:11 -04:00
David MannandClaude Opus 5.5 d41e1af130 Merge main into feat/history-snapshot-options
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 00:47:43 +02:00
David MannandClaude Opus 5.5 78692cfb28 Merge main into feat/file-216-2-large-fixtures
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 00:46:51 +02:00
David MannandClaude Opus 5.5 b2e98a7d20 Merge main into fix/history-panel-menu
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 00:42:55 +02:00
David MannandClaude Opus 5.5 8782a235ce Merge main into feat/auto-219-8-panel-command-check
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 00:41:34 +02:00
David MannandClaude Opus 5.5 b0f661be3d Merge main into fix/history-options
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 00:40:14 +02:00
David MannandClaude Opus 5.5 683e06aafa Merge main into fix/smart-filter-last-mask
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 00:40:03 +02:00
David MannandClaude Opus 5.5 0d32619ed8 Merge main into fix/history-brush-source
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 00:39:45 +02:00
Gustavo Ziger 667ad683a5 Merge main into feat/zoom-animation-566 2026-10-14 19:38:43 -03:00
abc2cb c8e8712926 Name layerFilter in the ui_set tool description
main's UI_SET_FIELDS gained layerFilter (#5268) but the ui_set description did not,
so ui_set_description_names_every_accepted_field fails on ubuntu.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F8jU8SSgnSWm5L17agT9ZT
(cherry picked from commit 1d1cb4e462)
2026-10-14 22:35:01 +00:00
abc2cb ad236be126 Merge Layers Panel part 1 (ui_set layerFilter description fix) into codex/fill-mask-preview-20261012 2026-10-14 22:34:53 +00:00
abc2cb 49aba9f2bd Merge Layers Panel part 1 (ui_set layerFilter description fix) into codex/layers-subrow-scaling-20261012 2026-10-14 22:34:52 +00:00
abc2cb 0e009c246f Name layerFilter in the ui_set tool description
main's UI_SET_FIELDS gained layerFilter (#5268) but the ui_set description did not,
so ui_set_description_names_every_accepted_field fails on ubuntu.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F8jU8SSgnSWm5L17agT9ZT
(cherry picked from commit 1d1cb4e462)
2026-10-14 22:34:50 +00:00
abc2cbandClaude Sonnet 5.5 1d1cb4e462 Name layerFilter in the ui_set tool description
main's UI_SET_FIELDS gained layerFilter (#5268) but the ui_set description did not,
so ui_set_description_names_every_accepted_field fails on ubuntu.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F8jU8SSgnSWm5L17agT9ZT
2026-10-14 22:34:47 +00:00
David MannandClaude Opus 5.5 d201fbe056 Merge main into fix/lens-filters-smart-locks
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 00:33:46 +02:00
David MannandClaude Opus 5.5 27c4c56326 Merge main into fix/4017-huge-new-document
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 00:32:33 +02:00
David MannandClaude Opus 5.5 5a4df1a363 Merge main; BUG-208-4 done, rows re-checked against main
Re-checked every row this PR flips against current main: the cited
tests still exist and none of the rows was flipped meanwhile.
BUG-208-4 is done too: shift_alt_before_the_drag_intersects_the_selection
(marquee_tests.rs) covers the marquee Shift+Alt intersect.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 00:29:48 +02:00
bazmarthandClaude Opus 5.5 2fc221e66b Color: a picked colour recolours the selected type and shapes, as in Photoshop
The Color panel, the Swatches panel and the Color Picker set the foreground;
like Photoshop, the new colour now also goes to what is selected, depending on
the tool in hand (new apply_color.rs, which the three already call through):
- characters selected while editing type: those characters (as before);
- a Type tool, not editing: every selected type layer (type.setStyle);
- a shape tool, a Pen or a path selection tool: every selected shape layer's
  fill (shape.edit);
- any other tool (Move, brushes...): only the foreground.

One pick is one history step for all the layers it recolours; a drag in the
Color panel's field or sliders is one step too (coalesce).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 22:27:37 +00:00
Davit MatchakhelidzeandClaude Opus 5.5 90ae8ce456 i18n(ka): bring the Georgian catalog up to date
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 02:17:37 +04:00
Davit Matchakhelidze f2c584ccf9 Merge upstream main into ka-language 2026-10-15 02:17:37 +04:00
Finn Newick d770fd35f1 Merge remote-tracking branch 'origin/main' into fix/bundle-save-lock
# Conflicts:
#	crates/format/tests/roundtrip.rs
2026-10-14 23:12:45 +01:00
bazmarthandClaude Opus 5.5 8744820a27 Shapes: rounded corners on live triangles, polygons and stars (TOOL-214-12)
As Photoshop's rounded triangles and polygons, a live polygon (the Triangle
tool draws a 3-sided one, stars included) now has one corner radius:
- doc: LiveShape::Polygon gains corner_radius (serde default, so older
  .pcraft files load sharp);
- vector: shapes::fillet and shapes::round_corners round every vertex with a
  circular arc tangent to both edges, each capped so neighbouring arcs meet
  at most halfway along an edge;
- engine: shape.create / shape.edit take "cornerRadius"; transforms scale it
  like a rectangle's radii;
- ui: the Properties panel shows a Corner radius field for polygons, and the
  on-canvas corner widgets now cover every selected rectangle, triangle,
  polygon and star (Path Selection, the Rectangle/Triangle/Polygon tools,
  Move with Show Transform Controls). Dragging any widget gives every
  selected shape the same radius; Alt still changes one corner of a
  rectangle. The widgets take the unsnapped press: snapping used to pull a
  shape tool's press off the widget, so the tool drew a new shape instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 22:07:03 +00:00
wwew 98fc6ab072 fix(cms): write the product name as PhotoCraft in built-in profile descriptions (#5614) 2026-10-14 15:06:35 -07:00
Ikki Nishiharaandharanishi 42fb79e909 fix(ui): widen tool-options drag targets (#5135)
Co-authored-by: haranishi <223786623+haranishi@users.noreply.github.com>
2026-10-14 15:06:22 -07:00
Ahmed0_0Mamdouh 1f1e8d734f Fix #5414: Keep created paths visible and editable (#5424)
* Paths: keep work and shape paths visible with any tool (#5414)

* Tests: improve path overlay regression coverage
2026-10-14 15:06:13 -07:00
agent-346022andagent-346022 602344bae0 Fix filter preview live during drag (#5549)
* Filter dialogs: paint the preview computed mid-drag instead of waiting for the pointer to stop

A preview that finished while the slider was still moving was thrown away before it
could reach the canvas, because the worker result had to match the request on every
field including the parameters. Every completion of a drag lands after the value has
moved on, so none of them matched, the worker was handed the newest value instead, and
that one went stale in turn. Nothing was ever painted while the pointer moved: the
effect appeared only once the slider had been still for about a frame of preview
time, which is what "I have to stop the slider and wait" looks like.

The display gate a few lines below already had the opposite rule. It compared the
document, revision, dialog, layer, channel target, command and proxy factor and
deliberately left the parameters out, so that a slightly old frame stays on screen
mid-drag. The publish gate disagreed with it and won, so the frame the display gate
was written to keep never existed.

Publish a successful result when the finished request matches the current one on
everything except the parameters, and let the existing display gate decide whether to
keep it. The two gates now share one predicate, FilterPreviewKey::same_target, so
they cannot drift apart again.

Errors keep the exact match. A value the pointer has already dragged past should not
raise a notice, and a failure is not something to show stale.

What this deliberately does not change:

- A reopened dialog has a new id, a committed document a new revision, a different
  command or channel target a different key, so a result from another preview is still
  never painted. Covered by a_reopened_dialog_discards_the_previous_dialogs_finished_preview.
- The freshly computed request is still what decides whether a new computation starts,
  so the worker still converges on the value the dialog actually holds.
- One preview runs at a time and a stale one is still cancelled only once the values
  settle, so this adds no work to the worker; it only stops discarding completed work.
- OK still recomputes at full resolution, so a frame shown mid-drag is never what gets
  written to the document.

Test: a_preview_computed_mid_drag_reaches_the_canvas starts a blur at one radius, moves
the slider before that preview lands, and requires the completed frame to reach the
canvas while the slider is still on the new value. It fails on the old gate, timing out
after 10 s with no frame published.

* Filter dialogs: three guards on a mid-drag preview, after review

The first version of this let any completed frame through that matched the dialog
on everything but the parameters. Review found three ways that is wrong, and all
three are now closed and pinned by a test.

A stale result with nothing to show. Storing it replaces a good frame with an empty
one, which the display gate paints as "draw nothing": the canvas blinks back to the
unfiltered layer mid-drag. The exact request may still store an empty result, which
is how a filter that no longer applies clears the canvas, so the guard belongs on
the stale arm only. Splitting the match arm is what makes that separable; the
earlier single arm forced a false choice between the two.

A late frame replacing an exact one. Drag the slider away and straight back: the
frame on screen is already exact for the dialog, and the in-flight frame for the
value on the way out would have overwritten it, showing a blur the user has already
undone. A stale result is now dropped when the stored preview is already exact.

Errors were already scoped to the exact request and stay there: a value the pointer
has dragged past should not raise a notice, and the value it comes to rest on will
raise its own when it is recomputed.

Also pinned by test, because both are easy to undo by accident:

- The reopen test was not reaching the gate. discard_closed reclaims a closed
  dialog's job a frame earlier in the real app, and the test called it too, so the
  stale result never arrived and the test passed even with the dialog id removed
  from the comparison. It now drives the gate directly. Verified by mutation.
- The mid-drag test asserted nothing about what the display gate does with the
  published frame, so re-adding params there passed. It now asserts the canvas
  actually returns something to draw, and it keeps polling until a frame for the
  dialog's current value lands, which is what pins fresh to an exact match.

Tests are deterministic: the worker job is gated on a channel and signals when its
result is already in the worker channel, so nothing sleeps and nothing races the
150 ms settle timer that cancels a job whose values stopped changing.

Verified by mutating each guard and confirming a test catches it:
  publish gate back to exact-match ................. killed
  drop the is_some guard ........................... killed
  drop the already-exact guard .................... killed
  same_target ignores the dialog id ............... killed
  display gate compares params again .............. killed
  fresh relaxed to same_target .................... killed
  same_target ignores k ........................... killed

k stays in the comparison on purpose. A 36 MP document previews at k=4, and
preview_factor lowers k as a pixel-sized parameter approaches its minimum, so k does
change under the slider. Relaxing it would paint a frame at a scale the preview
policy exists to avoid, and would loosen the display gate further than upstream
wrote it. The cost is a one-computation pause when the slider crosses a threshold
on a large document; that test keeps the choice visible.

* Filter dialogs: fix a race in the new tests that let CI pass them

The four new tests signalled each other through a channel the worker sends from inside
`compute`. But the worker only puts the result into the channel after `compute` returns:

    let result = compute(&work);
    let _ = tx.send(result);

So a test that woke on the signal and called `ensure_filter_preview` immediately could
reach `poll()` before that send. On a loaded CI runner it did: ubuntu failed
`a_mid_drag_empty_result_leaves_the_preview_alone` with no frame published at all. The
comment in the test claimed the result was already in the channel, which was the one
thing it was not.

The tests now drive the canvas until the state they need appears, which does not depend
on the order of that send. They also check their invariant on every pass rather than
only at the end: a wrongly published frame can be replaced by the next, correct one
before the loop stops, which had already left the reopen, late-frame and empty-result
tests unable to see their own mutation.

Unchanged: the assertions, the production code, and the four mutations that broke each
guard — re-verified, 7 of 7 still caught.

Runs: 30 back-to-back runs of the four tests on 12 cores, no failure; the full crate
twice, 2800 pass.

---------

Co-authored-by: agent-346022 <340881286+agent-346022@users.noreply.github.com>
2026-10-14 15:06:04 -07:00
David MannandClaude Opus 5.5 64efae47c8 Guide Layout: the disabled Rows field no longer turns Rows on (#5625) (#5626)
The disabled Number field still drew a DragValue with range 1..=1000,
which clamps the default rows 0 to 1 and reports a change; writing that
back made the Rows checkbox's `positive` fallback turn on, so OK added
guides at the top and bottom. Disabled number fields no longer write
back. Kittest regression covers Rows and Columns.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-14 15:05:55 -07:00
Jason Xiang 2a0bebb49a fix(engine): validate bounded extended filter parameters (#5586) 2026-10-14 15:05:46 -07:00
Sabbir Ahmed 2eabf45ba5 fix(ui): ⇧ marquee square keeps equal sides on the pixel grid (#5472) (#5506)
The ⇧ square (and a 1:1 fixed ratio) is built in continuous document
coordinates, and `marquee_px` then snapped each axis to the pixel grid on
its own: floor the near edge, ceil the far one. A press between pixels,
dragged 100.5 px, snapped x to 101 and y to 102, so the readout and the
committed selection were off by one. `marquee_preview_px` now grows the
shorter side to the longer one, away from the press point, so the square
still covers every pixel the drag touched. Ants, readout and commit share
this path.

Fixes #5472
2026-10-14 15:05:36 -07:00
Juan Antonio RedondoandClaude Opus 5.5 1f33e4f6d7 fix(ui): a held arrow key keeps stepping the focused value field (#5474) (#5497)
Holding Up/Down in a value field (Character panel tracking, size, …)
stepped it a couple of times, then jumped focus to the field above.

Each arrow step re-requested focus on the field that already had it.
egui's request_focus resets the field's event filter, so on the next
frame egui no longer knew the field takes vertical arrows. A key repeat
landing on that frame was read as "move focus up". Single presses
rarely hit that frame; held keys always do.

Only request focus when the field lost it (after a typed sum gives it up
to be worked out). Regression test feeds key repeats on consecutive
frames with a field above and failed before the fix (focus moved after
two steps).

Fixes #5474

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 15:05:26 -07:00
DaktylandNigel Ihza Firdausy 051959ea7b Double-clicking the empty workspace shows File › Open (#5367) (#5429)
Double-clicking the empty workspace shows File › Open (#5367)

Also covers the same fix as #5461; thanks to its author.

Co-authored-by: Nigel Ihza Firdausy <106657905+Ni-zav@users.noreply.github.com>
2026-10-14 15:05:16 -07:00