Commit Graph
11425 Commits
Author SHA1 Message Date
aiongg 766156e24b Panels: batch dialog tests pick the field nearest its label
A dock field can share a row with a dialog label behind the modal.
2026-10-25 05:32:35 +00:00
aiongg bedcab596f Panels: load layouts saved before workspaces as the default
A saved docking value that is not a craft-ui workspace, such as the bare
layout with dockingHidden written before workspaces, no longer migrates:
the window opens with the default layout built from the saved panels,
dockTabs and dock, and its collapsed custom groups are dropped. Workspaces
load as saved. The width a user dragged the native dock to, which egui
remembers under the native dock's panel id, sizes the default column once.
2026-10-25 05:21:54 +00:00
Hector VillarrealandClaude Opus 5.5 a49952971c fix(ui): Full Screen Mode needs a document (#9349)
With no document open, Full Screen Mode (and Full Screen Mode With Menu
Bar) showed the start screen on the black full screen pasteboard, where
a light theme's dark text and logo are nearly invisible. Photoshop
refuses Full Screen Mode without a document.

Both modes are now disabled with no document (Cycle Screen Mode too,
unless it would bring a full screen mode back to Standard), and a full
screen mode left with no document - the last one closed - goes back to
Standard Screen Mode.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 23:20:56 -06:00
aiongg b0622d20ca Autosave: a recovery listing judges each key once, so an autosave in progress isn't listed twice (#9324)
* Autosave: a recovery listing judges each key once, so an autosave in progress isn't listed twice

* Autosave: the recovery listing builds for the browser too
2026-10-25 01:09:21 -04:00
aiongg cfbefc5dd1 Panels: draw every layout, the canvas included, with craft-ui's docking
The canvas is a protected `canvas` panel in the docking layout: it never
moves, floats, closes or takes tabs, and accepts side splits, so a panel
dropped on it opens a frame beside it. The dock area fills the space the
menus, bars and toolbar leave, with new dock zones on.

Until the workspace is customized, the layout is built each frame from the
native dock's state: the canvas beside one end-side dock column of the
shown groups, with their tab order, selected tabs, user-set heights and
collapse, and the Studio themes' Properties group floating over the
canvas. The native dock's commands keep acting on that state. ui.set
dockWidth resizes the dock column. A panel no workspace has placed opens
in its native group, or as that group at its native place in the column.
Layouts saved without the canvas load beside it.
2026-10-25 05:03:08 +00:00
Hector VillarrealandClaude Opus 5.5 c46a74621d Export: tag an untagged gray image with the working gray, not sGray
CodeRabbit (discussion_r4369684193): an untagged grayscale document is
shown through the default working gray (Dot Gain 20 %-compatible, gamma
1.732), but its unconverted samples were tagged sGray, so the exported
file looked darker than the canvas. They are now tagged with the profile
they are shown in, as Photoshop embeds its working gray.

Test: untagged_documents_embed_the_profile_they_are_assumed_to_be_in
(the gray PNG case).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 23:02:27 -06:00
VoiceLessQ 91e18fa45a paint: 13 more painting tools wrap across the canvas edges in Pattern Preview
Clone Stamp already wraps in Pattern Preview (#4997). Blur, Sharpen,
Smudge, Dodge, Burn, Sponge, Mixer Brush, Color Replacement, Background
Eraser, Pattern Stamp, History Brush, Healing Brush and Spot Healing now
take "wrap": true as well, and the canvas sends it while Pattern Preview
is on (#8883).

The sequential-dab tools run their dabs on WorkTiles, moved into
photocraft_paint::retouch and given a wrap tile: each canvas pixel is kept
once and read and written wherever it repeats, so a live stroke and its
commit still give the same pixels. The composite tools go through #4997's
periodic::Composite via one periodic::stroke helper. Spot Healing centres
its sampling window on the stroke, at most one canvas across.

With wrap off, every command takes the path it took before.
2026-10-25 02:50:50 -02:00
Hector VillarrealandClaude Opus 5.5 6f1164e034 fix(io, engine): Embed Color Profile writes sRGB for an untagged document (#9325)
An untagged document (a new one in the default working space, or a file
opened without a profile) is treated as sRGB (sGray for grayscale), but
Export As, Save As and Save for Web wrote no profile for it, so viewers
had to guess. Photoshop embeds sRGB IEC61966-2.1 for both a new and a
"Don't Color Manage" document when the profile is embedded.

A flat export to a format that carries profiles now tags an untagged
image with the profile assumed for its mode; the codec still leaves it
out when embedding is off, and formats without profiles are unchanged.
Save for Web does the same when Embed Color Profile is on.

Tests that relied on untagged exports carrying no profile (an EXIF
ColorSpace round trip, the Export As proxy-estimate premise, an Affinity
preview fixture, a WebP lossy check) now say so explicitly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 22:40:40 -06:00
vngocvan 5d3a67c20d fix(export): honor sRGB for untagged documents (#9325) 2026-10-25 11:30:38 +07:00
PerchAnton d744f155a0 fix: integrate current main for PR #6510 2026-10-25 06:18:56 +02:00
aiongg 7804234ef0 Panels: pin craft-libs at 8a503cfe7 2026-10-25 04:02:29 +00:00
aiongg 03b67dae4a Panels: use craft-ui's docking workspace and commands
Repin every craft-libs crate to 2869b8cc. The customized layout is a
craft_ui::docking::Workspace; window.panel.*, window.workspace.* and
ui.dock parse as DockCommand and apply through it. Workspaces saved
before the version field load with their hidden panels, dock-back
places and collapsed groups.
2026-10-25 03:57:20 +00:00
Khawar Zamman Wani 578602c6f2 ci: re-run the Windows integration job (gpu parity access violation) 2026-10-25 09:21:45 +05:30
dotCooCoo 0bb3ec2ae9 Tests: the effect-map deadlock watchdog waits 120 s for each render, not for all 101
effect_maps_with_nested_rayon_work_do_not_deadlock rendered its document
101 times and failed when the whole run took longer than 120 s. On a
machine busy with other builds the renders slow down far enough to pass
that limit while every render still finishes, and the test then fails
with "effect-map rendering deadlocked (#276)".

The render thread now sends a message after each render, and the test
fails when 120 s pass without one. A render that never finishes still
fails the test after 120 s.
2026-10-24 20:42:38 -07:00
DuBearteandClaude Opus 5.5 58b8308569 feat: type on a path follows its path when the path is edited (#9114)
Type on a path keeps its own path, but nothing could edit it: the path
tools showed and edited the work path it was made from, so the text
stayed put. Its own path is now Photoshop's Type Path: with the type
layer selected, Direct Selection (and the anchor tools) show and edit
it, the path.* commands take it with "name": "layer", path.list names
it "<layer> Type Path", and the type is laid along it again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 23:40:58 -04:00
Khawar Zamman Wani d9aa174ac3 codecs test: name the banded-limits test by the size, not another editor (#8536 review) 2026-10-25 08:12:50 +05:30
skylartaylor c6d87dc1ea egui037: reconcile current PhotoCraft main and qualify CI 2026-10-25 03:41:54 +01:00
David MannandClaude Opus 5.5 92dfbca72f Crop auto-scroll: only for a press on the canvas (#9307)
A crop drag left over by a tool switch (#9223) must not scroll the view
while a panel slider beside the canvas is held.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 03:26:57 +01:00
David MannandClaude Opus 5.5 b3f3146402 Artboards: cover Artboard from Layers / Group in the sampler test (#9302)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 03:23:22 +01:00
David MannandClaude Opus 5.5 1326394a1c Match Rotation leaves a pending crop's turn out (#9308)
In the Crop tool's default mode the active view's camera carries the
crop's turn (View::rotation = -crop_angle). Window > Arrange > Match
Rotation and Match All copied that turn into every other view and
floating window, which stayed turned after the crop was committed.
While the crop drives the camera, the view's own rotation is 0 (picking
the tool straightened it), so that is what gets copied, and the active
view keeps its crop camera.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 03:17:26 +01:00
David Mann f54f5b43c8 Merge remote-tracking branch 'origin/main' into fix/crop-drag-autoscroll 2026-10-25 03:13:59 +01:00
David MannandClaude Opus 5.5 3640b31625 Crop / Perspective Crop: a drag held past the canvas edge scrolls the view (#9307)
The edge auto-scroll (#4183) ran only while app.drag was set, but both crop
tools keep their gestures in app.crop.drag / app.pcrop.drag. Frame draws,
moves and classic resizes, and Perspective Crop box, corner and quad drags,
now scroll too; turns and the default mode's camera-driven drags stay as
they were.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 03:13:26 +01:00
David Mann 078f7184bb Merge origin/main 2026-10-25 03:13:17 +01:00
David MannandClaude Opus 5.5 e76b8d3fd4 Artboards: Color Sampler points follow the document when a board re-bases the canvas (#9302)
A board placed or moved left of / above the origin shifts the whole document
(fit_canvas), but no artboard path moved the Color Sampler points or the
painting symmetry, so they read other pixels afterwards. fit_canvas now returns
its shift and every caller moves both by it, as Canvas Size's sampler map does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 03:13:16 +01:00
aiongg c65b5d25d3 Merge pull request #9061 from wanikhawar/wanikhawar/modal-workspaces
fix(ui): Liquify, Content-Aware Fill, Filter Gallery and Adaptive Wide Angle are modal, like Camera Raw
2026-10-24 22:11:26 -04:00
David MannandClaude Opus 5.5 e01fa8ba4e Image: Trim (Transparent Pixels) ignores alpha that rounds to 0 at the document's depth (#9299)
Trim tested the float composite's alpha for > 0, so a pixel the 8-bit image stores as
alpha 0 (e.g. alpha 1/255 on a 40 % layer) still counted as content and kept a margin.
Judge alpha against half a step of the document's depth (8/16 bit); 32 bit is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 03:04:21 +01:00
Khawar Zamman Wani ed0d5e3362 io test: the black TIFF generator is Linux-only, like its test 2026-10-25 07:23:16 +05:30
David MannandClaude Opus 5.5 4aff057464 Address CodeRabbit review: a Windows Ctrl straighten line doesn't snap its start (#9277)
Windows Ctrl both starts a straighten line and is held while drawing it,
which turns snapping off on Move and Up; the press still snapped, so the
frame turned by a different angle. The override now covers the press of
a straighten line too, and every straighten press snaps as a point,
wherever it starts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 02:49:35 +01:00
David MannandClaude Opus 5.5 81c716b85a Crop: test Step Forward under a drawn frame too (#9285)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 02:45:10 +01:00
David Mann 7f0676b3e0 Merge remote-tracking branch 'origin/main' into fix/crop-history-jump 2026-10-25 02:35:36 +01:00
David MannandClaude Opus 5.5 9891eaeb2e Crop: History jumps wait for a pending crop (#9285)
With a drawn crop frame, a History panel click (state, snapshot, Step
Forward/Backward or Delete in its menu) or a control-channel
history.selectState resized the document under the frame, which kept its
coordinates, so Enter cropped the old ones. The Edit menu already greys
these while a crop is pending; the panel and the control channel come
through app.run, so crop_ui::intercept now refuses them there and the
panel menu greys them, as for Free Transform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 02:35:32 +01:00
David MannandClaude Opus 5.5 6f70783ba9 Crop: a Straighten line inside the frame no longer snaps like a frame move (#9277)
A press inside an edited, upright Classic Mode frame got the frame-move
snap even when it drew a Straighten line (button armed, or Cmd/Ctrl), so
every point of the line was shifted by the offset that would align the
moved frame, and the frame turned to the wrong angle. The line's ends now
snap as points, as they already do outside the frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 02:35:30 +01:00
David Mann bd137cbb84 Merge remote-tracking branch 'origin/main' into fix/crop-click-snap 2026-10-25 02:32:05 +01:00
David MannandClaude Opus 5.5 617d40d268 Address CodeRabbit review: only the exact own resolution passes, and keepPrintSize with it keeps the pixels (#9260)
An out-of-range value that merely rounded to the document's resolution as f32
was accepted, and keepPrintSize with an own resolution below 1 ppi resampled
the canvas against old.max(1.0), shrinking it to 1 x 1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 02:30:33 +01:00
David Mann 073eb4eb33 Merge remote-tracking branch 'origin/main' into fix/crop-invalid-rect 2026-10-25 02:29:01 +01:00
David MannandClaude Opus 5.5 46ac4fc8f3 Crop: refuse an invalid explicit rectangle instead of cropping to the selection (#9279)
image.crop built an explicit rectangle only when x, y, width and height were
all integers with width and height above 0; anything else fell back to the
selection's bounds, so width 0, a negative or string size, or only some of
the four keys cropped to the selection and reported success. A rectangle
that is passed (any of the four keys non-null) but incomplete or empty is now
a bad-params error and the document is unchanged; {} still crops to the
selection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 02:28:59 +01:00
FartmanAndBurps df77c50657 Preview Work Path dragging without document mutations
Show fractional drag feedback and commit one undoable move on release. Cancel stale or interrupted gestures safely.
2026-10-25 01:28:15 +00:00
Khawar Zamman Wani 43a6b30354 TIFF: refuse an image too large for free memory instead of being OOM-killed (#8536 review)
Limits::banded() lifted the 2^30 px cap, and the only failure left was a
tile allocation error. Linux overcommits, so the tiles were allocated
anyway and writing them had the out-of-memory killer end the app and
every open document. A valid all-black Deflate RGB8 TIFF declaring
100,000 x 100,000 px (30 GB of pixels) is a few tens of MB on disk and
passes the bomb guard.

- io memory.rs: memory::available() is MemAvailable plus free swap on
  Linux, capped by the process's cgroup v2 memory.max (and those above
  it) and memory.swap.max; None elsewhere (Windows refuses past its
  commit limit, which the importer already reports). check_fits refuses
  when the need plus a 512 MiB reserve doesn't fit.
- tiff_to_document checks the layer's tiles plus the working copies of
  one group before allocating anything: "not enough memory to open this
  100000 x 100000 px image: it needs about 41.7 GB and 7.8 GB is free".
- codecs TiffBands::group_bytes gives the largest group; a single-strip
  file is one group (the whole image), which the check now counts.
- TiffBands puts Truncated before MorePages, as the whole-image decode.
- raster: try_write_interleaved reports a wrong length as
  AllocationError::LengthMismatch { expected, got }, not SizeOverflow.
- Comments and docs no longer name another editor.

Tests: io a_tiff_larger_than_free_memory_is_refused (300,000^2 black
RGB8, Linux) was OOM-killed in a 4 GB cgroup without the check; memory
unit tests for the policy and the meminfo/cgroup parsing; codecs
a_cut_off_page_of_several_warns_in_the_whole_image_order and
group_bytes_is_the_largest_group_handed_over.
2026-10-25 06:55:51 +05:30
dotCooCoo a120492156 Smart objects: closing a document forgets its missing files, and updateChanged drops an older look
Session::close now forgets which of the document's linked files were
missing, so a document reopened with the same id lists none until the
next look. layer.smartObjects.updateChanged drops a look still running
on a worker thread, which stamped the files earlier and could clear a
missing file the command had just found.
2026-10-24 18:21:00 -07:00
Dylan M. TaylorandClaude Sonnet 5.5 b278ff7245 security(affinity): charge archive names, failed reads, corner arrays, attachments, pages and font names (#9257)
* security(affinity): charge archive names, failed reads, corner arrays, attachments, pages and font names

Bound the remaining per-occurrence and table-driven expansion work left after
#8938: aggregate archive entry-name bytes (copied only for the winning name),
extraction allowance charged before decoding so failed checksums are not free,
CnrD corner arrays charged as curve records, AdCh and gradient arrays charged
as slots (gradient positions copied only up to the stop limit), a document-wide
page-rectangle cap, and per-field and aggregate limits on retained font names.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* security(affinity): charge pixel state-array scans against the slot budget

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

* fix(affinity): charge decoded name length and bound PagR rectangle collection

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 21:20:41 -04:00
Khawar Zamman Wani 874ff42a9e docs(control): Adaptive Wide Angle is a modal workspace too 2026-10-25 06:49:07 +05:30
Khawar Zamman Wani 066321f7dd fix(ui-egui): Path Operations review fixes from the RC
- Dragging every component with Path Selection moves the whole path
  (`shape.edit` move), so a live rectangle or ellipse stays live instead of
  losing its corner-radius widgets through `path.moveAnchors`.
- Esc and switching tools end a Pen draft with `pen_end`: a refused commit
  (a locked layer) keeps the path as the Work Path instead of retrying
  `shape.create` and the error on every frame. Return still keeps the draft
  to commit again.
- The first component always draws as Combine: `path.setOperation` leaves
  it alone (naming only it is refused), and the menu and + / - neither add
  a History step for it nor show another operation.
- Only Path Selection, which shows the component selection, changes the
  selected components; the Pen tools set the next path's operation.
2026-10-25 06:45:34 +05:30
David MannandClaude Opus 5.5 3d5c2ac62b Crop: a click on the frame or a handle never snaps it (#9283)
A release at the press point went through the snapping like any drag's,
so a click inside an edited frame (or a default-mode click moving the
image) or on a handle pulled an edge within reach onto the document's and
recorded a box Undo step; a double-click to commit cropped that rect. A
click now leaves the frame alone, as a Move-tool click leaves the layer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 02:15:19 +01:00
dotCooCoo b5210494ef Layers panel: the filter row lists the artboards that hold the selected layers
The filter-type dropdown has an Artboard entry after Mode. With it
picked, the Layers panel lists only the artboards that hold the selected
layers and their contents, as the tree shows them (closed groups stay
closed). With nothing selected, or with a selected layer in no artboard,
the panel is not filtered. The type has no controls of its own.

ui.set {layerFilter: {by: "artboard"}} picks the type. The control
protocol, the ui_set description and the parity table document it.
2026-10-24 18:14:37 -07:00
skylartaylor 14c059c971 M0.37: migrate PhotoCraft to egui 0.37
Reconcile main 486afd82cc while preserving reviewed lifecycle, capture, IME and settings migrations. Include canonical dependency pins and the generated lockfile.

All nine CI stages passed: 11,580 passing test executions, zero failures and 91 ignored across 93 summaries. Native/browser acceptance and paired app performance remain open.
2026-10-25 02:14:31 +01:00
David MannandClaude Opus 5.5 1e695c5a28 Crop: Esc in full screen cancels a drag on the default frame (#9275)
The untouched default frame lets Esc leave full screen (#7315), but the
frame stays the default until the gesture's release, so Esc mid-drag left
full screen and the drag went on. A gesture in progress now keeps Esc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 02:13:26 +01:00
David MannandClaude Opus 5.5 d1353e90a7 Image Size: a document's own out-of-range resolution still passes (#9260)
An imported file can carry a resolution outside 1..30000 ppi (PNG pHYs 1 px/m, PSD 0, TIFF in
cm), and the Image Size dialog sends it back unchanged on OK; refusing it would block a plain
resize that worked before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 02:05:42 +01:00
Vlad Grankovsky 15bf0873ba channels: support editing selected color channel sets 2026-10-25 02:02:10 +01:00
David Mann cd8e21de0a Merge remote-tracking branch 'origin/main' into fix/image-size-resolution-range 2026-10-25 02:50:21 +02:00
David MannandClaude Opus 5.5 9b84eebad8 Image Size: refuse a resolution outside 1..30000 ppi instead of clamping it (#9260)
`image.imageSize` read `resolution` as `as f32` and clamped it to 1..10000, so 1e39 (inf) silently
became 10000 ppi, -5 and 0 became 1 ppi, a string was ignored, and a valid 20000 ppi (allowed by
File > New, Bitmap and the dialog's own field) dropped to 10000. Parse it once like `image.crop`:
non-finite, non-number or outside 1..=MAX_RESOLUTION is an error and the document is untouched;
the keepPrintSize path uses the same value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 02:50:06 +02:00