Commit Graph
11425 Commits
Author SHA1 Message Date
David Mann 025416f5ca Merge remote-tracking branch 'origin/main' into pr-9827
# Conflicts:
#	contributors/people.toml
#	crates/ui-egui/src/dialogs/filter_dialog/tests.rs
2026-11-08 15:10:38 +01:00
David Mann a65a23f829 Merge remote-tracking branch 'origin/main' into fix/11901-bg-eraser-graded-alpha 2026-11-08 15:10:31 +01:00
David Mann 7acc08cbb9 Merge pull request #12306 from hectorviov/fix/mixer-indexed-bitmap
Mixer Brush: refuse Indexed Color and Bitmap documents with the alert (#11958)
2026-11-08 15:09:44 +01:00
David Mann 295615fa8c Merge pull request #12307 from hectorviov/fix/ruler-shift-snap
Ruler: Shift snaps to 45 degree steps without making the ruler longer (#11985)
2026-11-08 15:08:26 +01:00
David Mann 9a31a9bb19 Merge pull request #12279 from hectorviov/fix/smoothing-options-greyed
Smoothing Options: greyed out at Smoothing 0 % (#11939)
2026-11-08 15:07:14 +01:00
David Mann b0b41cee25 Merge pull request #12291 from DuBearte/fix/12022-hand-menu-entries
Hand tool: the canvas right-click menu lists only Fit on Screen, 100%, 200% and Print Size
2026-11-08 15:05:49 +01:00
0c6b564536 Magic Wand: skip the selection mask when Contiguous is off; more tests (#11848)
PR #11848 built the full-area selection mask for every Subtract and
Intersect click, though the global match (Contiguous off) ignores it.
Build it only when the fill is contiguous.

Tests for the review: Contiguous off keeps the global match, Subtract and
Intersect without a selection select nothing, the row check fails on a hole
in the selected run, and the fill's half-selected threshold (0.49 vs 0.5)
at the seed and at the fill's edge.

Co-Authored-By: DuBearte <130190089+DuBearte@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 15:04:43 +01:00
David Mann 6742c417e5 Merge pull request #12286 from DuBearte/fix/12068-zoom-bar-buttons
Zoom tool bar: 100%, Fit Screen and Fill Screen with the reference tooltips, no hint text
2026-11-08 15:04:16 +01:00
David Mann d4a92e1d2f Merge pull request #12293 from hectorviov/fix/mixer-blend-combinations
Mixer Brush: Useful mixer brush combinations dropdown (#11946)
2026-11-08 15:01:34 +01:00
David Mann d700555ac2 Merge pull request #12254 from hectorviov/fix/brush-refusal-alerts
Brush: the reference's alert when it can't paint
2026-11-08 14:59:21 +01:00
David Mann 7d8c18c34e Merge pull request #12265 from hectorviov/fix/color-replacement-refuses-modes
Color Replacement: refuse RGB/32, Grayscale, Bitmap and Indexed documents
2026-11-08 14:56:43 +01:00
David Mann b57ecbc683 Merge pull request #12260 from hectorviov/fix/color-replacement-lab
Color Replacement: in Lab, Color keeps L and takes the foreground's a and b
2026-11-08 14:54:14 +01:00
David Mann e5decd0b85 Merge remote-tracking branch 'origin/main' into pr-11848 2026-11-08 14:54:13 +01:00
David Mann 959d2b0443 Merge pull request #12274 from TrevorBrown-dev/feat/patch-shift-constrain-12129
Patch: Shift during the drag keeps the patch horizontal or vertical (#12129)
2026-11-08 14:52:24 +01:00
David Mann 85971ce95f Merge remote-tracking branch 'origin/main' into pr-5224
# Conflicts:
#	crates/ui-egui/src/panels/brush_panel/tests.rs
#	crates/ui-egui/src/panels/brush_sections/tests.rs
#	docs/brush-parity.md
#	docs/gaps.md
2026-11-08 14:51:51 +01:00
David Mann 6dfd9033d4 Merge pull request #12253 from hectorviov/fix/background-eraser-reset-tip
Background Eraser: a 13 px hard tip at 25 % spacing after Reset Tool
2026-11-08 14:50:31 +01:00
David Mann 635303f03b Merge pull request #12269 from hectorviov/fix/eraser-block-right-click
Eraser: in Block mode a right-click opens the Brush / Pencil / Block menu
2026-11-08 14:48:31 +01:00
Trevor BrownandClaude Sonnet 5.5 fec4980c7b Patch Destination: clone only the selection; guard, error path and redo tests (#12119)
The Destination branch of the Patch command no longer clones the whole document: it takes only the selection before the target surface borrows the document, and computes the selection's content bounds once, passing them to `is_hard_rect` and reusing them for the translate. Behaviour is unchanged.

Tests are split and extended: Destination with a feathered, ellipse, lasso and holed-rectangle selection leaves the selection in place while the patch still lands; Destination with no selection fails, adds no history entry and a following undo reverts the previous step, not the setup; redo restores both the patched pixels and the moved selection; Source and Content-Aware are separate tests, the latter asserting a pixel change; the main test also asserts source pixels unchanged, the destination carrying the source texture, the moved selection still hard-edged, and the returned damage and offset. A rectangle larger than the patched area and a partly covering selection without a hole cannot be built, because the patched area is the selection's own content bounds; an inverted selection makes the area the whole canvas, which Patch refuses.

Verified: `cargo test -p photocraft-engine --lib patch` 18 passed; `--lib retouch` 119 passed; clippy `--all-targets -D warnings` clean; `cargo fmt -p photocraft-engine` clean.

Not changed: the coverage pass in `is_hard_rect` (one pass over the patched area per command, the same order of work as the patch itself).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove and briefed; Sonnet 5.5 wrote at medium
2026-11-08 08:44:18 -05:00
David Mann dada110838 Merge pull request #12263 from hectorviov/fix/color-replacement-history-name
Color Replacement: History names each edit "Color Replacement Tool"
2026-11-08 14:35:37 +01:00
Triwarr 51174ad04e PDF: review fixes for shape caches and font registration
- Render each shape cache clipped to its own bounds instead of the full
  page clip.
- Copy embedded font bytes before locking the shared text engine and take
  the lock per font, not for the whole registration loop.
- Track seen font content keys in a HashSet instead of scanning the font
  list for every glyph; hash glyph text for fake-bold pairing instead of
  cloning strings.
- Update the module and `pdf-editable` feature docs to describe text and
  accepted no-op clips.
- Poll the cancellation watcher every 20 ms; Device callbacks only cover
  paints, so a single long path still needs the watcher.
2026-11-08 14:34:23 +01:00
a21907fff2 #9396: carry on the nearest open end across all subpaths
With the ends of two open subpaths both within the Pen's reach, the press
took the first subpath listed, even when the pointer was nearer the other
one's end, so the wrong subpath was carried on. It now compares every open
end in reach and takes the nearest.

Co-Authored-By: kavishkashehan726-sudo <kavishkashehan726-sudo@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 14:20:26 +01:00
David Mann f3596b86ea Merge pull request #12257 from hectorviov/fix/background-eraser-brush-popup
Background Eraser: the compact brush popup from the picker and a right-click
2026-11-08 14:17:19 +01:00
David Mann 2acece2a51 Merge pull request #12256 from hectorviov/fix/color-replacement-alt-click
Color Replacement: Alt+click picks the foreground like the Eyedropper
2026-11-08 14:11:56 +01:00
David Mann 7acc57a25f Merge pull request #12252 from hectorviov/fix/smart-object-rasterize-wording
Rasterize prompt: the smart object wording as in the reference
2026-11-08 14:08:35 +01:00
David Mann d48ec66062 Merge remote-tracking branch 'origin/main' into pr-9396 2026-11-08 13:56:45 +01:00
David Mann a36428ccf2 Merge pull request #12248 from hectorviov/fix/blend-keys-leave-behind
Blend mode keys leave Behind when they pick another mode
2026-11-08 13:56:38 +01:00
rmsff 08b1149175 fix(ui): vertical text gets Top / Center / Bottom alignment buttons (#12059)
The Type options bar always showed Left / Center / Right. As in the
reference application, for vertical text it now shows "Top align text",
"Center text" and "Bottom align text" with vertical glyphs: when the
edited or selected text layer is vertical, or with no text targeted
when the Vertical Type tool is active. The buttons still set left /
center / right and the lit one follows the targeted paragraph. The Type
Mask tools keep today's buttons (not measured).

The orientation is read from the target's own document, as the
paragraph style is, so a text edit left in a background document is
not judged by a same-id layer of the active one.

The three glyphs (vertical-align-{top,middle,bottom}.svg) are original
work drawn on Lucide's grid and stroke, with their ATTRIBUTION.md row;
they are kept out of the Lucide row's wildcard.
2026-11-08 15:55:59 +03:00
Trevor BrownandClaude Sonnet 5.5 342355d2dc Patch badge: a drag keeps its press modifiers; concrete arrow geometry and negative drag tests (#12130)
Cause: while a Patch or Content-Aware Move drag was under way, the cursor badge read the current modifiers, but the release and the paint read the modifiers from the press (`drag.modifiers`). Pressing Shift or Alt mid-drag after a plain press inside the selection flipped the arrow to Add or Subtract although the drag still moved the patch, and a drag pressed with Shift showed no badge once the key was let go.

Fix: `badge` takes the modifiers of the Patch or Content-Aware Move drag in progress, as the Lasso line below it already does. The tests now pin the arrow glyph's exact geometry (3 strokes, horizontal shaft, both barbs from the tip, mirrored ends), a drag started outside showing no arrow inside, Content-Aware Move staying badge-free, the press modifiers winning mid-drag, Shift+Alt giving Intersect on hover, and the Curvature Pen's real Move badge over an anchor.

Verified: `cargo test -p photocraft-ui-egui --lib patch_cursor` 10 passed (9 in patch_cursor_badge_tests plus the retouch_ui one), `retouch` 58 passed, clippy --all-targets -D warnings clean, fmt clean.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Model-Effort: Opus 5.5 drove and briefed; Sonnet 5.5 wrote at medium
2026-11-08 07:41:42 -05:00
rmsff 368eee3679 fix(ui): a Type Mask always replaces the selection when committed (#12073)
Committing a Type Mask took the selection mode from the modifiers held
at that moment, so Shift added the text outline to the selection and
Alt subtracted it. As in the reference application, a commit now always
replaces the selection with the outline: a click outside the text, the
Commit button and Cmd+Return, with or without Shift or Alt.

type.createSelection keeps its "operation" parameter for scripts.
commit_with keeps its modifiers parameter so its callers don't change.
The #3036 canvas test keeps its check that the working text has no
Layers panel row; its Shift and Alt assertions now expect a replace.
2026-11-08 15:30:49 +03:00
rmsff 9f5af15a19 fix(ui): Escape commits a Type Mask session as Command+Return does (#12070)
Escape while typing with the Horizontal or Vertical Type Mask tool threw
the session away. As in the reference application it now commits: the
text outline becomes the selection in one history state and no layer is
added, whatever Preferences > Type "Use ESC to commit" says. The options
bar's Cancel still throws the session away.

Escape on an empty mask text, or while an input method is composing,
was not measured and still cancels. A Command transform drag keeps its
own Escape, and the Type tool's Escape still follows the preference.

The #1055 canvas test that pinned the old Escape now goes through
Cancel, which keeps what it guarded: the selection and layers unchanged.
2026-11-08 14:57:55 +03:00
SBaksa 28d2d9095d History and plug-in names: trim the fillers and blank padding at the ends too
trim_name drops white space, ZWNJ/ZWJ and the blank characters (Braille blank, Hangul fillers,
invisible operators, tag and other default-ignorable blanks) from both ends. A variation or
Mongolian free variation selector or CGJ that belongs to a kept character stays, and so do Hangul
filler jamo that complete a syllable. History names use the same trim as plug-in names.
2026-11-08 22:40:53 +11:00
yoriswind d6b1bb7c45 Merge current main and scope Move marquee selection 2026-11-08 03:37:42 -08:00
rmsff e112f34ef5 fix(ui): a Type tool click on a Lock All text layer shows the locked alert (#12040)
A Type tool click on a text layer under Lock All, its own or an
enclosing group's, started an edit the engine then refused at the
first keystroke, with a status-bar error. As in the reference
application, the click now makes the layer active and opens the
alert "Could not use the type tool because the layer is locked."
with OK; no edit starts and no history state is added.

The check is the engine's own (effective_locks(..).all, as in
check_text_unlocked). A position lock alone and a click on empty
canvas keep today's behaviour.
2026-11-08 14:32:28 +03:00
David Mann 6ab9915718 Merge pull request #11852 from yoriswind/codex/toolbar-first-w-11757
Use toolbar order for fresh tool shortcuts
2026-11-08 12:21:52 +01:00
David Mann 320d285e1a Merge pull request #9887 from Firstbober/feat/indexed-color-matte
feat: add Indexed Color Matte options
2026-11-08 12:20:27 +01:00
David Mann 60ad38d4ae Merge pull request #5250 from augrclk/fix/brush-scatter-axes-header
Brush Settings: place Both Axes on the Scatter header
2026-11-08 12:19:26 +01:00
David Mann 342760093e Merge pull request #10823 from ljkx/fix/gradient-stop-drag-off
Gradient stops dragged off the bar are removed in every stop editor (#10742)
2026-11-08 12:16:52 +01:00
rmsff e81e813b94 fix(ui): the Type options bar gets the reference tooltips (#12057)
The font family menu showed no tooltip, the font style menu none,
and the font size icon and colour swatch other wording. They now
show the reference application's texts: "Search and select fonts",
"Set font style", "Set font size" (icon and field) and "Set text
color", through the catalogue with the English fallback. The
controls keep their accessible names.

The family tooltip is added by the options bar only: the Character,
style and Glyphs panels share the picker and keep their texts.

canvas_tests' T-icon tooltip probe took the tooltip to be the
widget's own name; it now takes the expected tooltip text.

Credit: own entry in contributors/people.toml.
2026-11-08 14:10:06 +03:00
Triwarr d39fc3f9cd PDF: fifth review round on editable import
- Accept explicitly closed page-sized clip rectangles (m l l l l h).
- Pair fake-bold strokes through a text/font/order index instead of a
  full scan, keeping the comparison cap and cancellation checks.
- Tests: solid zero-length stroke stays editable, explicit clip
  rectangle.
2026-11-08 11:29:05 +01:00
tjbbjt ec7ca9161d Place: wait for a preparing Free Transform before placing the next dropped file 2026-11-08 01:42:38 -08:00
SBaksa c2f85a590f Plug-in names: store the name trimmed, count U+2800 and unassigned ignorables as blank
A manifest name such as "\nTone" was checked trimmed but shown as given, so a line break reached
the menu; padding also got past the 64-character limit. The name is now stored trimmed.
The blank Braille pattern and the unassigned default-ignorable ranges no longer count as visible,
in plug-in names and History names. Applying a patch no longer takes the selection icon, and the
History source column has its doc comment back.
2026-11-08 19:59:43 +11:00
Triwarr bf21e370f4 PDF: fourth review round on editable import
- Count actual fake-bold comparisons toward the cap instead of the
  product of glyph and stroke counts.
- Fall back for any dashed zero-length subpath (open or closed); test
  covers a stroked line followed by a closed point.
- Handle invisible glyphs before the soft-mask check so hidden text
  does not rasterise the page.
2026-11-08 09:54:52 +01:00
tjbbjt ff683eb601 Free Transform: keep the placed/copied-layer marker through preparation; stop on cancel; check the layer selection 2026-11-08 00:33:08 -08:00
tjbbjt 60eb1e80be Free Transform: redraw only what the box changes; prepare large layers as a job 2026-11-07 23:28:48 -08:00
Triwarr 0692a3cf47 PDF: third review round on editable import
- Bound fake-bold glyph/stroke pairing by comparison count and check
  cancellation during the scan.
- Keep both knots when a closing curve returns to its start; fall back
  for a dashed single-point subpath.
- Skip inkless runs (zero-width/format characters) instead of treating
  an empty cache as a render failure.
- Track soft masks and reject the page only when paint happens while one
  is active.
- Tests: fake-bold mismatch across a path, closing curve loop.
2026-11-08 08:21:19 +01:00
Hector VillarrealandClaude Opus 5.5 48cdda6a89 Mixer Brush: open the Indexed/Bitmap refusal alert once, not once per press (CodeRabbit review on crates/ui-egui/src/canvas/tool_input.rs:373)
A press that arrives while the same refusal alert is still open (ui.pointer
can send one) no longer stacks a second alert, as the Background Eraser's
range alert already does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 01:09:01 -06:00
Hector Villarreal b9924879f9 Ruler: Escape during a drag ends it and keeps the ruler (#11986)
Escape while drawing a ruler or moving one of its ends now ends the drag and
keeps the ruler where it was at the Escape: the later moves and the release
change nothing, the ruler is neither removed nor put back, and no history
step is added. The next press drags normally again. The protractor's arm
(not measured) keeps today's behaviour.
2026-11-08 01:01:42 -06:00
SBaksa be7ebc078a Lasso: refuse a history name that shows nothing or hides formatting
A historyName of zero-width, filler or BOM characters showed an empty History
row, and a bidi control or line separator could make a row read differently
from its name. A history name now has no control or line-break character
anywhere, loses white space and ZWNJ/ZWJ at its ends, and is then held to the
plug-in menu-label rule, now shared as
photocraft_plugins::manifest::printable_name (1-64 characters with a visible
one, no hidden format characters; plug-in names also refuse U+2028/U+2029).
2026-11-08 17:55:02 +11:00
Hector Villarreal 541b972091 Ruler: Shift snaps to 45 degree steps without making the ruler longer (#11985)
constrain now keeps the pointer's legs instead of its distance: on a
diagonal step both legs take min(|dx|, |dy|) with their signs, and on a 0
or 90 degree step the dominant component stays and the other becomes 0.
This applies to drawing, to moving either endpoint around the other, and to
a protractor's second arm.
2026-11-08 00:41:16 -06:00
Hector Villarreal 8272e6b9f4 Mixer Brush: refuse Indexed Color and Bitmap documents with the alert (#11958)
A Mixer Brush stroke in an Indexed Color or Bitmap document now fails before
anything is painted, with the reference's alert texts (convert to RGB Color /
Grayscale mode to edit); paint.mixerBrush returns that error and leaves the
document and History unchanged. A press on the canvas shows it as an Error
alert instead of a status-bar message. RGB, CMYK, Lab and Grayscale still
paint.
2026-11-08 00:28:08 -06:00