18357 Commits
Author SHA1 Message Date
David Mann 7a4449a1e7 Merge pull request #18549 from davidmann4/fix/help-search-typing-18548
Menus: typed letters land in the Help search (#18548)
2026-12-01 09:52:09 +01:00
dholzricandClaude Fable 5.2 6ced6b1456 Warp: refuse a group before the several-layer exception (#18500)
With a group active and a smart object, type or shape layer selected
with it, the exception for those unmeasured selections returned before
the group check, so the group's layers were still warped. The group
check now runs first; the exception still applies when the active layer
is not a group.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-12-01 02:18:28 -06:00
dholzricandClaude Fable 5.2 676a82656d Warp: refuse several targets, a linked layer and a group (#18500)
edit.transform.warp was enabled by has_layer alone, so over automation it
warped the active layer of a several-layer selection, a linked layer
without its partner, and the children of a group, each as a "Warp" step.
The menu refuses all of these.

The command now uses one_warp_target, built on the same engine helpers
the menu rule reads (selection_targets, box_targets). It refuses more
than one transform target, a layer that linked layers move with, and a
group that is not an artboard.

Kept as before (not measured): a linked partner that is hidden or
locked, and a smart object, type or shape layer among several selected
layers.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-12-01 01:55:28 -06:00
dholzricandCursor 2f86011d14 Zoom: keep Zoom Out mode across Reset All Tools (#18191)
`reset_all` in `crates/ui-egui/src/tools/tool_reset.rs` replaced `app.ui.tool_options` with `ToolOptions::default()`, switching the Zoom tool back to Zoom In (`zoom_in = true`) when it was in Zoom Out mode, whereas Reset Tool already kept `zoom_in`.

Carry `zoom_in` across `ToolOptions::default()` in `reset_all` while still resetting Scrubby Zoom and the other tools' options, update `kept_by_reset_tool`'s doc comment, and update the single old assertion in `patch_reset_tool_tests.rs`.

Co-authored-by: Cursor <[email protected]>
2026-12-01 01:54:11 -06:00
dholzricandCursor a67b3344ec Move: allow multi-layer moves when the active layer is hidden (#18136)
`hidden_target::refusal` in `crates/engine-core/src/hidden_target.rs` checked only the active layer for `layer.translate`, refusing Move drags, Alt+drags, and arrow nudges with "Could not complete your request because the target layer is hidden." whenever a hidden layer happened to be active in a multi-layer selection.

Allow `layer.translate` when no explicit `layer` parameter is given and two or more layers are selected, keeping the refusal for a single hidden layer selected alone and for calls that explicitly name a hidden layer.

Co-authored-by: Cursor <[email protected]>
2026-12-01 01:43:18 -06:00
yoriswind 3e5013cea5 Preserve near-black brush texture in Hard Mix 2026-11-30 23:40:32 -08:00
dholzricandClaude Fable 5.2 939a21c85e Magic Eraser: a contiguous fill stays in the selection's bounding rectangle (#18068)
With a selection, magic_eraser found the region on the whole canvas and
only clipped the erase to the selection. A fill could then reach another
selected part by a path outside the selection, and a click outside it
erased inside it.

With a selection and Contiguous on, the region is now found inside the
selection's bounding rectangle, over selected and unselected pixels
alike. A seed outside the rectangle finds nothing and adds no History
state.

Kept as before (not measured): a selection with partly selected pixels,
and Sample All Layers.

One existing test clicked outside the bounding rectangle of its
selection and expected an erase; its click moved inside the selection.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-12-01 01:40:03 -06:00
yoriswind 3fc81b6a30 Merge commit '59153889bd59de0f6316851fa0b3b24505ca60be' into codex/local-17391-main-conflict 2026-11-30 23:39:18 -08:00
dholzricandCursor 38622c0083 Group from Layers: grey it while an artboard is selected (#18190)
`can_group_from_layers` in `crates/engine-core/src/cmd/layer_multi_cmds/structure.rs` only refused the Background layer, leaving `layer.new.groupFromLayers` enabled when an artboard was among the selected layers so the dialog opened and then failed on OK with "artboards can't go into a group".

Refuse in `can_group_from_layers` with "artboards can't go into a group" whenever any selected layer is an artboard, leaving `group_layers_with` and `layer.groupLayers` unchanged.

Co-authored-by: Cursor <[email protected]>
2026-12-01 01:30:23 -06:00
David Mann 59a4e6a84c Merge origin/main into the batch branch 2026-12-01 06:13:47 +01:00
yoriswind ca28a2ab51 Keep groups with locked children in place when aligning left or right 2026-11-30 21:12:01 -08:00
David Mann dd1aff337f Merge branch 'bb-epic-color-replacement-mx3tl41i' of github.com:davidmann4/photocraft into bb-epic-color-replacement-mx3tl41i--17788-cr-cursor-pixel-group-locks 2026-12-01 06:09:48 +01:00
yoriswind f5f399c0d6 Show Move rollover with Auto-Select off and transform controls on 2026-11-30 21:09:23 -08:00
yoriswind 5f9e059306 Reject alignment of a group with its own descendants 2026-11-30 20:58:47 -08:00
yoriswind 1b6f273527 Encode untagged 32-bit RGB pixels for Quick Export PNG 2026-11-30 20:48:27 -08:00
David Mann 8238840aa4 Merge branch 'bb-epic-color-replacement-mx3tl41i' of github.com:davidmann4/photocraft into bb-epic-color-replacement-mx3tl41i--17787-cr-lock-pixels-alert 2026-12-01 05:41:35 +01:00
David MannandClaude Opus 5.5 05b3028fbd Color Replacement: no-entry cursor for pixel, group and artboard locks (#17788)
The cursor is now the not-allowed sign over a layer with Lock Image Pixels, a group with
Lock All or Lock Image Pixels around it, an artboard with Lock All around it, that locked
group or artboard itself, and a hidden Lock All layer. Lock Transparent Pixels, Lock
Position, the artboard lock and the Background layer keep the tip; Alt keeps the Eyedropper.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 05:27:17 +01:00
yoriswind a94ee2dad8 Refuse Smart Object conversion in Bitmap and Indexed Color 2026-11-30 20:26:47 -08:00
David Mann 22a0bb7bf9 WIP: Color Replacement: no-entry cursor for pixel, group and artboard locks (#17788) 2026-12-01 05:23:09 +01:00
David Mann aec193d611 Merge branch 'bb-epic-color-replacement-mx3tl41i' of github.com:davidmann4/photocraft into bb-epic-color-replacement-mx3tl41i--17786-cr-tolerance-pressure 2026-12-01 05:14:56 +01:00
kubuntugamer 6028419c67 Background Eraser: the lightest pen pressure erases nothing
At pressure 0.01 a 41 px tip is 0.41 px wide, and the dab radius floor lifted
it to a half-pixel radius, so the stroke erased a 1 px line while the
reference leaves the layer untouched. A Background Eraser stroke whose every
point is narrower than half a pixel now paints nothing; pressure 0.05 and up
and mouse strokes are unchanged.

Fixes #18060
2026-11-30 22:11:38 -06:00
David MannandClaude Opus 5.5 ac27a5f445 Color Replacement: Lock image pixels opens the "layer is locked" alert (#17787)
A press with the Color Replacement tool on a layer whose image pixels are
locked, by its own lock or by a locked group or artboard around it, now
opens the alert with OK and paints nothing, like Lock All. Alt+click still
samples; Lock transparent pixels, Lock position and the artboard lock still
paint; a hidden layer and a group keep their alerts first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 05:08:38 +01:00
yoriswind 2b6a395181 Require the complete Lorem Ipsum sample 2026-11-30 20:08:05 -08:00
yoriswind adb0fb24d5 Clamp both Lorem Ipsum selection offsets 2026-11-30 20:08:05 -08:00
yoriswind fa78938ff6 Handle non-exhaustive menu nodes in Type test 2026-11-30 20:03:09 -08:00
David Mann eaa4fb73f0 Merge branch 'bb-epic-color-replacement-mx3tl41i' of github.com:davidmann4/photocraft into bb-epic-color-replacement-mx3tl41i--17785-cr-size-pressure-default 2026-12-01 05:00:11 +01:00
David MannandClaude Opus 5.5 1e50d2a0c4 Batch fix-up: translucent Smooth gradients save as drawn (#13855, CodeRabbit on #18551)
The colour-alpha check compared the read-back opacity with the stops'
alpha read linearly, but Smooth (and every baked gradient) renders the
nearest stop's alpha, and the opacity bake maps Smooth to Classic. It now
compares the read-back opacity with the alpha `bake_interpolation`
renders, so a Smooth gradient with translucent colours falls back to its
render stops. The save test adds Smooth and plain Classic.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 04:56:29 +01:00
David MannandClaude Opus 5.5 4beeecd9cd Color Replacement: Tolerance on Pen Pressure scales each dab's tolerance (#17786)
With the brush popup's Tolerance control on Pen Pressure, each dab replaces only the
colours within Tolerance x the pen pressure at that dab. Off, the mouse and Stylus Wheel
keep the full Tolerance. Dabs now carry the input pressure they were placed at, and
`paint.colorReplacement` takes `toleranceControl` (off, penPressure, stylusWheel).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 04:54:13 +01:00
yoriswind aeba1971ce Separate the Type menu preview and language groups 2026-11-30 19:50:05 -08:00
David Mann 000ff7cdbb Merge branch 'bb-epic-color-replacement-mx3tl41i' of github.com:davidmann4/photocraft into bb-epic-color-replacement-mx3tl41i--17784-cr-target-cursor 2026-12-01 04:44:26 +01:00
David MannandClaude Opus 5.5 ab0b615cc7 Batch fix-up: Stroke keeps Normal in Indexed Color and Bitmap (#18039, CodeRabbit on #18551)
Stroke shares Fill's Blending rows, so its Normal also read Threshold,
though `edit.stroke` blends Normal by its opacity and never snaps.
`blending_rows` now takes the choice: Fill names it Threshold, Stroke
keeps Normal.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 04:43:50 +01:00
David MannandClaude Opus 5.5 da0c334bb4 Batch fix-up: translucent stop colours under Linear or Perceptual save as drawn (#13855, CodeRabbit on #18551)
Without opacity stops of its own, a kept gradient's colour alpha was
written as opacity stops under the kept method; Linear and Perceptual bake
those on the next read (0.25 came back near 0.14). The record now counts
as matching only when the method and Smoothness give that alpha back, so
other gradients are saved as their render stops. The save test covers
Classic, Linear and Perceptual.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 04:32:45 +01:00
David MannandClaude Opus 5.5 c15a2fa6f0 Color Replacement: no-entry cursor over a target it refuses (#17784)
Over a pixel or adjustment layer's mask, an alpha channel, the Quick Mask,
one colour channel alone or a smart object, the Color Replacement tool now
shows the not-allowed cursor before any click, as the reference application
does in RGB documents. The composite and a vector-mask-only layer keep the
tip (Caps Lock the crosshair). Two colour channels, a group's mask, a
disabled mask and a hidden or locked layer's mask were not measured and keep
the tip.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 04:20:05 +01:00
David Mann 59153889bd Merge queue batch #18564: #18552
Merge queue batch: 1 PRs (#18552)
2026-12-01 04:12:48 +01:00
David MannandClaude Opus 5.5 7e43e330c4 Color Replacement: size follows pen pressure from the first use and after Reset Tool (#17785)
A first pick of the tool now starts its "Size:" control at Pen Pressure, as
Reset Tool already did (#11931), so a pen stroke is the tip size times the
pressure. Tests for both and for the stroke width at 0.25, 0.5 and full
pressure; the Brush tool keeps its own default.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 04:04:03 +01:00
David Mann 061e54ad65 WIP: Color Replacement: size follows pen pressure by default (#17785) 2026-12-01 03:56:24 +01:00
dholzricandClaude Fable 5.2 4643437839 Layer Align: grey it for a selected layer with Lock Position (#18443)
can_align had no lock check, so the six entries stayed enabled and a
click failed with "position-locked", or moved the other layers when the
locked one happened to be in place.

position_locked gives the refusal for the first selected layer whose
position is locked. can_align uses it to grey the entries; align asks it
before the edit, with Lock All counted, so the refusal also comes when
the locked layer would not move and no History state is added.

Kept as before: the menu state with Lock All and a locked layer together
with a pixel selection (not measured), and the Background in the
selection.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
2026-11-30 20:56:20 -06:00
David MannandClaude Opus 5.5 5c96c63fbb Color Replacement: refuse one or two colour channels (#17783)
The tool recolours the full colour composite only. In an RGB document a
press, live stroke or paint.colorReplacement with one colour channel
targeted now gives "Could not use the Color Replacement tool because it
only works in full color modes.", with some but not all channels
"...because the target channels do not cover the composite.": nothing
painted, no History state. All channels still paint; other colour modes
were not measured and keep painting. The check sits in the shared
Color Replacement target refusal, so the canvas alert and the command
error use the same text.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 03:54:06 +01:00
kubuntugamer ff36a7b1c4 Background Eraser: not-allowed cursor over a layer mask and a 32-bit document
The reference shows the no-entry sign over a targeted layer mask and over the
composite of a 32-bit document; the tool painted with its tip cursor there.
The targets the item left unmeasured keep the tip cursor.

Fixes #18097
2026-11-30 20:52:14 -06:00
David MannandClaude Opus 5.5 ea9be47f11 Batch fix-up: converting a document converts render stops baked from kept Lab stops (#13855, CodeRabbit on #18551)
Lab stops kept with a method other than Classic bake into stops in the
document's RGB, but the conversion skipped the Lab stops and baked the
render stops again unchanged. Kept stops in another model are now
brought into the old mode first, so the render stops are converted and
still match the kept gradient.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 03:47:15 +01:00
David MannandClaude Opus 5.5 108c2f638d Batch fix-up: gradient fill edits in CMYK, Gray and Lab documents keep the kept gradient (#13855, CodeRabbit on #18551)
Converting the edited fill to the document's mode converted the baked
render stops too, so they no longer matched the record and a save wrote
generated stops without the method and the kept stops. A kept gradient
that is still baked now has its own stops converted and is baked again;
the live preview uses the same conversion.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 03:47:15 +01:00
David MannandClaude Opus 5.5 c9616de7bb Batch fix-up: adding or deleting an opacity stop keeps the other segments' midpoints (#13855, CodeRabbit on #18551)
Only the split or merged segment of a kept gradient starts halfway; a
segment between the same two stops as before keeps its opacity midpoint.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 03:47:15 +01:00
David MannandClaude Opus 5.5 a46bc09a93 Batch fix-up: retained gradients keep colour-stop alpha on save (#13855, CodeRabbit on #18551)
A saved stop colour carries no alpha, so a kept gradient with translucent
stop colours and no opacity stops was written opaque. The writer now puts
the colour alpha into the opacity stops in that case.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 03:47:15 +01:00
David MannandClaude Opus 5.5 921a6252eb Batch fix-up: a kept gradient without opacity stops of its own no longer matches translucent render opacity (#13855, CodeRabbit on #18551)
A Gradient Overlay given a translucent ramp after import was saved with
that ramp under the kept method, so the next read baked it again into a
different curve. Such a record is now stale and the writer saves the
render stops.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 03:47:15 +01:00
David MannandClaude Opus 5.5 4dd8ef1920 Batch fix-up: Place Along Path fit, reach and tile limit (CodeRabbit on #18551)
- Fit and the end of the path use how far a tile reaches along the path: an upright tile on a vertical path ends 15 px
  past its centre for the 40 x 30 probe, not 20.
- Fit stretches the steps only as far as every tile still ends at or before the path's end, so shrinking tiles (Scale
  progression below 100 %) no longer reach past it.
- Tiles out of reach of the painted area are skipped (a run at a steady size in one jump) and keep their number and
  place, so spacing, progression and mirroring stay as on the whole path: a path starting far off the canvas no longer
  spends the tile limit there and paints nothing.
- A path that needs more than the 100,000-tile limit over the area is refused with a message, rather than filled part
  of the way and reported as done.
- The per-tile colour drift is worked out once per tile, not per pixel.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 03:46:21 +01:00
David MannandClaude Opus 5.5 289fe5cc14 Batch fix-up: Symmetry Fill dilations are the same for any selection on the canvas (CodeRabbit on #18551)
The range of dilation steps came from the painted rect, so a small selection dropped enlarged copies that still cover
it (a translucent tile's centre pixel changed), and type 6 numbered its copies from the largest step, so the same copy
drifted to another colour when the range changed. The range now comes from the canvas (with the area), and dilated
copies take their own step as the number for the colour drift; the drawing order stays as it was.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 03:46:21 +01:00
David MannandClaude Opus 5.5 f84e580ebb Batch fix-up: Random Fill along a path ignores the parts out of the area's reach (CodeRabbit on #18551)
A long subpath far off the canvas took nearly all the tiles (and swamped the visible line's share of the arc length),
so the visible line got none. The path's pieces are now clipped to the area grown by Max distance and the largest
tile's reach before the tiles are spread over them; without a path nothing changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 03:46:21 +01:00
David MannandClaude Opus 5.5 e7c35f7bba Batch fix-up: the dense Spiral edge test checks every selected pixel (CodeRabbit on #18551)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 03:46:21 +01:00
David MannandClaude Opus 5.5 993a0b7ee6 Batch fix-up: path sampling returns a piece's exact end points (CodeRabbit on #18551)
Far from the origin the blend of a piece's ends loses the near end's digits: a line from (1e16, 0) to (1, 0) sampled
at its length gave (0, 0). The start and the end are now returned as they are.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 03:46:21 +01:00
David MannandClaude Opus 5.5 ef9a745011 Batch fix-up: Quick Mask pair follows a direct close or a new document (#18135, CodeRabbit on #18551)
Session::close and add_document change the active document without a
command, so the swatches stayed on the Quick Mask pair after the Quick
Mask document closed and the next colour set was undone by the sync after
dispatch. Both now sync the pair with the active document.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-01 03:42:37 +01:00