159 Commits
Author SHA1 Message Date
David Mann 830316b775 Merge pull request #16955 from davidmann4/fix/16905-repin-own-window-moves
RAW Develop's window moves and resizes again (#16905)
2026-11-25 16:11:58 +01:00
David MannandClaude Opus 5.5 6604a4cec8 Move craft-libs to storytold next a165ef3a2c and egui to b15ffe9bf (own-window dialogs move and resize, storytold/craft-libs#3476)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 15:09:15 +01:00
David Mann a9b731d104 Merge #16012 into the merge queue batch
Brightness/Contrast: refuse a hidden or empty pixel layer (#14359)
2026-11-25 14:55:29 +01:00
David Mann ac393630ea Merge #16686 into the merge queue batch
feat(vector): every Pen click gets its own History entry (#12890)
2026-11-25 14:55:27 +01:00
David Mann b8eea8463d Merge #15990 into the merge queue batch
Fill and Stroke grey the modes the document can't use (#14647)
2026-11-25 13:28:25 +01:00
David Mann ec236094ca Merge #16638 into the merge queue batch
fix(tools): a pattern from an Indexed image keeps painting (#13071)
2026-11-25 13:28:24 +01:00
David Mann 3cf3766392 Merge #16017 into the merge queue batch
Content-Aware Fill with the whole canvas selected does nothing silently (#14253)
2026-11-25 13:28:23 +01:00
David Mann 8aaaa73199 Merge #16379 into the merge queue batch
Actions: play and record the Auto-Align Layers step (#14201)
2026-11-25 13:28:22 +01:00
David Mann aca633da34 Merge #15562 into the merge queue batch
feat(droplet): Create Droplet gets the Destination dropdown (#13711)
2026-11-25 13:28:20 +01:00
RickiNano 580011e93e Actions: play the Auto-Align step in the full app's session (#14201)
Engine split step 8 moved Auto-Align Layers to engine-vector, so the
playback and Undo test in engine-core built a session where
`edit.autoAlignLayers` isn't registered, and no longer exercised the
real command. It moves to the engine integration tests
(`atn_auto_align_play.rs`), where `Session::new()` installs every crate's
commands, and now also checks that playing the step adds one history
state. The import and export tests stay in engine-core.
2026-11-25 07:24:53 +01:00
David MannandClaude Opus 5.5 2f9362d241 Move craft-libs to storytold next 3656e8aaa4 (dock-gap fixes, storytold/craft-libs#3383, #3360, #3058, #3086, #3212)
On that pin DockAreaOutput.window_files is grouped per window; the files dropped on a floating panel's window are
flattened before they open (as aiongg/photocraft@54911df7f5).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 03:11:59 +01:00
hnoerenberg 98e31bc19d The droplet destination tests clean up their fixture folders
The `tmp` helper built its folder under the OS temp directory named
`photocraft-droplet-dest-<pid>-<name>` and only removed it at the start
of the next run, so every test run that did not reach the same name
again left its fixtures behind. The sibling droplet_play_options_tests.rs
already uses `tempfile::tempdir()` (engine-core has the tempfile dev
dependency); `tmp` now hands back the `TempDir` beside the path and each
test holds it, so the fixture goes when the test ends, panicked or not.
Paths are derived from the temp folder; no assertion reads the old
naming.
2026-11-25 03:07:18 +01:00
David Mann 3e3831ab41 Merge remote-tracking branch 'origin/main' into HEAD 2026-11-25 02:29:05 +01:00
David MannandClaude Opus 5.5 39f8ba661d Move craft-libs to storytold next a3174010b7 (font-manager builds for wasm again, storytold/craft-libs#3399)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-25 01:45:04 +01:00
hnoerenberg 326a8bd78f fix(vector): the Pen's live Work Path over a replace and a Redo (#12890)
The first click of a new path took the subpath index it carries from the
path that was in the document before the write. A replacing click sends
`path.set` without `op`, and that write leaves the drawn path the
document's only one (`vector_cmds/paths.rs`), so after Enter had finished
a path with one subpath the draft looked for its anchor at index one,
found no subpath there, and never went live: every further click stayed
in the draft and made no History step of its own. A click that joins the
path selected in the Paths panel still appends with `op`, so the count
that path had stays its index there.

Redo of one of the Pen's own clicks back to the History tip left no state
waiting to be redone, so the live draft did not follow the path: the next
pass cancelled it ("Pen draft cancelled because its source document or
path changed") and the click after that wrote a new one-anchor Work Path
over the path being drawn. `can_redo()` cannot tell that case from a
command that replaced the subpath, so the rule now asks who made the
state the document is on: the six Pen step names are refused for any
other `path.set` (`paths.rs`), so Redo and Step Forward to one of those
states rebuild the draft from its path, as stepping back to an earlier
state always did, while a command from elsewhere leaves a state under
another label and the draft goes stale there (#6593). `PEN_STEP_NAMES`
becomes an export of `vector_cmds` so the Pen's route and the allowlist
read one list.

`the_path_that_replaces_the_one_enter_finished_is_live_from_its_first_click`
and `redoing_to_the_tip_of_a_live_path_puts_its_click_back_on_the_pen`
fail at 39a3bc5377 - after Enter the steps there are only
["New Work Path"] where the clicks are two, and at the tip of a Redo the
draft is gone - and pass here.
2026-11-25 01:33:25 +01:00
David Mann 349af1806f Merge remote-tracking branch 'origin/main' into HEAD 2026-11-25 01:09:11 +01:00
David Mann 8cf4c99513 Merge #15092 into the merge queue batch
Summarize: order modifiers Alt, Shift, Ctrl off macOS (#14882)
2026-11-25 00:57:22 +01:00
David Mann 94f9683886 Merge #15767 into the merge queue batch
fix(atn): ask Continue or Stop when a played step names a missing layer
2026-11-25 00:57:20 +01:00
hnoerenberg 11e6ed38ea rustfmt over the spliced test line: the chain wraps as the file does elsewhere 2026-11-24 23:54:02 +01:00
hnoerenberg e691ebb031 The Destination run sits on main's session accessors: actions_mut(), the recording counters and the preset-store trait
The merged main moved the Actions state and the playback counters behind accessors
(ActionsExt::actions/actions_mut, Session::recording) and the preset store behind PresetStoreExt.
`run_droplet_open` now reads and writes the captured action list, the batch depth and the script
step budget through those, and its tests build their sessions with `crate::session()`, the way the
droplet tests on main do. The rule the tests pin is unchanged: a None run installs the droplet's
captured actions, raises the nesting depth for its own steps and hands both back.
2026-11-24 23:36:02 +01:00
hnoerenberg 0e8616faa6 Merge upstream/main into feat/droplet-destination-13711
# Conflicts:
#	crates/engine-core/src/cmd/automate_cmds.rs
#	crates/engine-core/src/cmd/droplet_destination_tests.rs
#	crates/ui-egui/src/dialogs/file_forms.rs
2026-11-24 23:12:58 +01:00
David Mann 7e8d2959ca Merge #14467 into the merge queue batch
New Document: documents created alike stay separate Recent items (#14038)
2026-11-24 22:20:16 +01:00
hnoerenberg e86d7a20b9 test(atn): start the engine guard tests from an installed session
CI runs one test process per test. These four started from a bare
Session::new(), so the first command returned NotInstalled and the unwrap
panicked: crates/engine-core/src/cmd/actions_cmds/tests.rs:438 in
recording_starts_with_no_document_open, and :447 in the shared helper
other_names_document that the three playback pins call. Every other test
in this file starts from crate::session(), which installs this crate's
commands first; the four now do the same.

Verified per test rather than per run: run alone, each of the four failed
before this change (unwrap on Err(NotInstalled)) and passes alone after
it. A single whole-lib process hides this because one test's install serves
the rest; the whole lib stays green either way (3276 passed, 0 failed).
2026-11-24 22:14:37 +01:00
David MannandClaude Opus 5.5 a2a757a997 Move craft-libs to storytold next c6a4484bca and egui to a87d00caa (storytold/craft-libs#3357)
craft-libs next now names egui a87d00caa in craft::egui_fork::REV, so the egui-fork gate passes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 21:20:21 +01:00
David MannandClaude Opus 5.5 87c83781ea Move craft-libs to storytold next a4db799563 (own-window dialogs keep their size, task bar keeps its controls)
Brings storytold/craft-libs#3269 (#16595) and storytold/craft-libs#3343 (#16657).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 20:42:16 +01:00
RickiNano f27cd5f0b9 Merge main into fix/new-doc-recent-items-14038
Since #15449 File › New is the shared NewDocumentDialog, so the old
app-local Recent heading, grid and tests are dropped in favour of main's
dialog code; that part now goes through storytold/craft-libs#2261.
Kept: document.recent.add and load_recent keep equal settings as
separate entries, now in crates/engine-core.
2026-11-24 20:42:15 +01:00
David Mann f00af04310 Merge remote-tracking branch 'origin/main' into HEAD 2026-11-24 20:20:40 +01:00
hnoerenberg 83b9637e56 feat(vector): every Pen click gets its own History entry (#12890)
In Path mode the Pen kept its anchors in a draft and put the whole path
into the document at the finish, so one Undo took a whole path of clicks
back. The first anchor now makes the Work Path, and every further press
writes it again, so History gains the step that press has: New Work Path,
New Anchor Point, Close Path, New Path Component, Pick-up Path or Drag
Anchor Point. Undo takes one click back at a time and the draft follows
its path; Enter and Esc end the drawing without a step of their own, and
the Make Shape button's step reads "Make shape from path".

The live draft reuses what Shape mode already does for its live layer, so
the Curvature Pen, the Freeform Pen, Shape mode, a selected saved path and
a vector mask keep holding their anchors in the draft until the finish.
2026-11-24 20:15:33 +01:00
David Mann 01459afbd7 Merge #16655 into the merge queue batch
Warp: remove the split line at the picked anchor
2026-11-24 18:46:09 +01:00
hnoerenberg f926cafb9a fix(atn): follow main's session accessor in the engine guard tests
main's engine split moved these tests into photocraft-engine-core, where the
session's action state sits behind actions() and actions_mut(); the three
action pushes now use the accessor.
2026-11-24 18:27:21 +01:00
hnoerenberg 17d7b5aa6d Merge upstream/main into fix/atn-recording-any-document-10769 2026-11-24 17:56:26 +01:00
Dan 530eb4191e Warp: remove the added split from its inner anchors 2026-11-24 16:19:06 +00:00
David Mann b188ab3476 Merge #16633 into the merge queue batch
Layers to Files: alert when the document only has a Background (#13968)
2026-11-24 16:28:05 +01:00
aiongg 218d0780fe Move craft-libs to storytold next 7762aab37b, which carries every release fix 2026-11-24 14:56:42 +00:00
aiongg 883daa21af Merge remote-tracking branch 'upstream/main' into rc-bump-next
# Conflicts:
#	crates/engine-core/src/cmd/swatch_cmds.rs
2026-11-24 14:06:32 +00:00
aiongg 50b2584dcc Move craft-libs to rc-integration 3e5f0cbdbc (adds the memo view fill fix from craft-libs#3319: the title bar spans the window again) 2026-11-24 13:32:25 +00:00
superplay2021 742efd64fe Merge latest main and reconcile Polygon Align Edges 2026-11-24 15:02:26 +02:00
Dan 608760bf21 Use the internal command argument for the Warp pick 2026-11-24 12:33:44 +00:00
Dan a4f869fe51 Warp: remove the split line at the picked anchor 2026-11-24 12:30:59 +00:00
RickiNano 123c88f0b0 Merge remote-tracking branch 'origin/main' into fix/fill-mode-by-document-14647
fill_ui.rs: main (#13421) seeds the Fill dialog's colour inks and gives defaults() the picked CMYK; this PR's
rows(app, ...) call stays so the Mode row reads the document. main's new reset test builds its rows with an app.
2026-11-24 13:17:11 +01:00
f2ac09d2ec Fix-up for #11756: Align Edges as the reference application renders it
The PR snapped shapes with a per-edge heuristic (pixel_align.rs, dash-cap tie
rules, a PSD coordinate-frame field threaded through engine, format and caches),
defaulted the option to off, and renamed the existing Rectangle/Triangle
"Align Edges" checkbox to "Snap Bounding Box" next to a second checkbox.

The reference application fits the whole shape at render time: the bounds of
what it paints (fill, or the stroke's outer edge) get a whole-pixel left/top
(a half rounds up) and a whole width/height, and the path is translated and
scaled into that box. Fill and stroke take one transform; curves stay
antialiased; inner edges of several subpaths are not snapped.

- photocraft_vector::align_edges implements that rule; CompiledShape applies it,
  so caches, the compositor, previews and extents agree; the fill/stroke split
  under layer effects starts from the whole shape's transform.
- Removed pixel_align.rs, the rasterizer helpers it needed, the document-space
  drag preview and psd_coordinate_frame (rounding the bounds absorbs the PSD
  quantization it was for).
- One Align Edges checkbox (ToolOptions::align_edges, stored and scripted as
  useAlignedRendering, older align_edges still read) on every shape tool and the
  Pen, on by default and after Reset Tool; it snaps the drag and sets the layer.
- PSD sn2P: written as 1 when on and left out when off, as the reference saves it.
- Dropped the dead path.set param, moved the control-protocol paragraph,
  rewrote docs/pixel-aligned-strokes.md, reverted the unrelated raw, font,
  Cargo and test-harness changes.
- Tests reproduce the measured cases (rectangles at .25/.4/.5/.6/.75, ellipse
  extremes and curve symmetry, 1/2/3 px strokes, rotated rect, Pen triangle,
  two subpaths, toggle off, stored path unchanged, one checkbox, Reset Tool).

Co-Authored-By: superplay2021 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 13:02:42 +01:00
David Mann ff0a368ce0 Merge remote-tracking branch 'origin/main' into pr-11756 2026-11-24 12:32:50 +01:00
David Mann d6c1546d5d Merge #13931 into the merge queue batch
Artboards to Files: Include Background in Export leaves the board's fill out (#13631)
2026-11-24 12:32:13 +01:00
David Mann 1b83dbc49a Merge #13891 into the merge queue batch
Create Droplet: the Play options are saved in the droplet and used by each run (#13709)
2026-11-24 12:32:13 +01:00
hnoerenberg ca431fde00 test(tools): pin the Indexed pattern row this change lets go, and name its follow-up
#12887 measured a second half of the rule the reference application holds: it refuses an Indexed pattern from another image, whose colours are not in the document's colour table, and paints only the one carrying that table. Tracking the source mode and not the table lets that case paint. Pin it exactly as it behaves now - the tile's red and green land in a document whose table holds neither - so the follow-up (#16642) is met with a test that says which way the behaviour has to go, and record the same thing where the field is documented: how a repeat definition of pixels already in the library picks its source, and that the PSD raw-block comparison now covers the new field. An index written before the source member still loads the whole pattern with no source, which the library test now strips the member to prove.
2026-11-24 12:21:44 +01:00
hnoerenberg 818a4a010d feat(doc): patterns record the colour mode they were defined from
Edit > Define Pattern composites the area in the document's pixel format, which stores an Indexed Color document expanded to RGB. Nothing on Pattern said where the tile came from, so a pattern taken from an Indexed image was indistinguishable from an RGB one, and a tool that cares about the difference had nothing to read.

The new field names the source mode. The pixels, the id and what the pattern library lists stay as they were. A pattern read from a file records no source: a .pat or PSD block says what its pixels are, not which document they came from. The library index and .pcraft carry the field, so a defined pattern keeps its source across a restart or a save; files written before it read as no source.
2026-11-24 11:22:16 +01:00
superplay2021 bc0560025a Merge latest main and preserve Align Edges shape edits 2026-11-24 11:58:55 +02:00
superplay2021 8231269c60 Merge latest main and preserve the CMYK command export 2026-11-24 11:55:21 +02:00
Dan c3a1d86eff Layers to Files: alert when the document only has a Background (#13968) 2026-11-24 09:40:43 +00:00
ljkx 898f507d6c Artboards to Files background tests: fill the boards' layers directly, since edit.fill moved to the paint crate 2026-11-24 09:26:46 +01:00