Commit Graph
10791 Commits
Author SHA1 Message Date
RickiNano bf330293cb Content-Aware Move: exact 8-bit rounding and a bounded no-pixels scan (#12192)
Review follow-up. A pixel counts as selected exactly when the selection's
coverage8 stores it nonzero: the least such coverage is found once by
bisecting the f32 bits, so the scan stays one compare per pixel.

The scan no longer costs more than the select.lasso it replaces: strips
start at 64 rows and double up to about 4 MP, and each strip is checked
in parallel, branch-free blocks (sequential on wasm). A corner-to-corner
line on 7360 x 4912 now takes 25-32 ms (was 65-73 ms; select.lasso took
23-27 ms). A lasso that selects is still answered after the first strip.

Adds a test for a lasso over pixel centres with Anti-alias off.
2026-11-08 18:59:50 +01:00
RickiNano e9d9c2a18c Content-Aware Move: decide "no pixels" by the lasso's own coverage (#12192)
Review follow-up. The check rasterizes the lasso as select.lasso does
(polygon_window over the canvas, kept from 1/255 as the selection stores
it) instead of a half-pixel area threshold. A tiny anti-aliased lasso that
covers part of a pixel selects it as before, and a thin lasso between
pixel centres without anti-aliasing now warns instead of adding an empty
Lasso step. Only the lasso's bounds are rasterized, 64 rows at a time,
stopping at the first selected pixel.

The Don't show again test now checks what reaches the preference store
and that a restart reads it back.
2026-11-08 18:59:50 +01:00
RickiNano 85c70cab19 Content-Aware Move: warn "No pixels are selected." for a drag with no area (#12192)
With no selection, a Content-Aware Move drag that encloses no area (a
click or a straight line) now opens the alert "No pixels are selected."
with OK and "Don't show again", instead of silently running select.lasso
on an empty polygon. No History state is added and nothing is selected.
A drag that encloses an area, a drag with a selection, and the Lasso tool
keep their behaviour.

"Don't show again" is a small reusable addition to the app's Error alert
(dialogs/dont_show_again.rs): the alert carries the dialog-preference key
it sets, and closing it with the box ticked keeps {"skip": true} there.

Fixes #12192
2026-11-08 18:59:50 +01:00
FredApps e564137b23 Merge pull request #12275 from Triwarr/pdf-editable
PDF: opt-in editable import (paths and text)
2026-11-08 18:13:39 +01:00
FredApps 79f1da3a93 Merge main and Hand menu test compatibility fix 2026-11-08 17:30:30 +01:00
FredApps dd6e77309f test(ui): align Hand menu anchor checks with fixed zoom rows 2026-11-08 17:28:55 +01:00
David Mann 535ea2d15c Merge pull request #12152 from davidmann4/fix/11904-bg-eraser-find-edges-graded
Background Eraser: Find Edges erases soft edges graded instead of cutting them hard (#11904)
2026-11-08 17:00:18 +01:00
David Mann 1c9448e87f Merge pull request #12341 from rmsff/fix/vertical-type-align-buttons-12059
fix(ui): vertical text gets Top / Center / Bottom alignment buttons (#12059)
2026-11-08 17:00:04 +01:00
David Mann 718b06645e Merge pull request #12299 from TrevorBrown-dev/fix/patch-cursor-arrow-12130
Patch: an arrow badge over the selection shows that a drag moves the patch (#12130)
2026-11-08 16:59:48 +01:00
David Mann 532421aa2a Merge pull request #12212 from TrevorBrown-dev/feat/open-as-smart-object-11678
File: Open as Smart Object... opens a file as a new document holding one embedded smart object (#11678)
2026-11-08 16:59:25 +01:00
David Mann 6b73593478 Merge pull request #12238 from hectorviov/fix/brush-picker-angle-widget
Brush Preset picker: the tip's angle/roundness widget at its top left
2026-11-08 16:59:09 +01:00
David Mann 8c94ba8a15 Merge pull request #12203 from hectorviov/fix/count-history-names
Count tool: History names Add/Drag/Delete Count Object, Add Count Group and one name per group setting (#11763)
2026-11-08 16:58:51 +01:00
FredApps 5ae31d3de2 fix(pdf): preserve editable import fidelity and bound caches 2026-11-08 16:58:06 +01:00
David Mann 89660c82fe Merge pull request #12231 from hectorviov/fix/note-stored-values
Notes: new notes store the reference application's colour, popup rectangle and local-time date
2026-11-08 16:57:08 +01:00
David Mann 90e362e7a6 Merge pull request #12221 from hectorviov/fix/perspective-crop-bar-buttons
Perspective Crop: the options bar's Cancel and Commit show only during a session (#11978)
2026-11-08 16:56:52 +01:00
David Mann be4f54df4c Merge pull request #12205 from DuBearte/fix/11968-pencil-auto-erase-tooltip
Pencil: the Auto Erase checkbox shows its tooltip
2026-11-08 16:56:35 +01:00
David Mann b0953546ca Merge pull request #12148 from hnoerenberg/fix/straighten-layer-states-12033
fix(engine): Straighten Layer greys out and refuses the states the reference does
2026-11-08 16:56:18 +01:00
David Mann 45c76d5c5c Merge pull request #12144 from hnoerenberg/fix/indexed-type-selection-12041
fix(engine): the Type tool leaves a selection in Indexed Color
2026-11-08 16:56:00 +01:00
David Mann 32ce08364b Merge pull request #9991 from ljkx/feat/raw-xmp-crop
Camera Raw sidecars: apply the crop, stop reporting RawFileName (#9985)
2026-11-08 16:55:43 +01:00
David Mann 8f94ff568f Merge pull request #12338 from rmsff/fix/type-mask-replaces-selection-12073
fix(ui): a Type Mask always replaces the selection when committed (#12073)
2026-11-08 16:54:03 +01:00
David Mann 2a2b381297 Merge pull request #12333 from rmsff/fix/type-mask-escape-commits-12070
fix(ui): Escape commits a Type Mask session as Command+Return does (#12070)
2026-11-08 16:53:46 +01:00
David Mann 5a288de0e8 Merge pull request #12328 from rmsff/fix/type-options-bar-tooltips-12057
fix(ui): the Type options bar gets the reference tooltips (#12057)
2026-11-08 16:51:41 +01:00
David Mann 2ffe5d1008 Merge pull request #12102 from Bobderto/fix/12085-zoom-menu-centre
Zoom tool menu: keep the view centre for Zoom In and Out
2026-11-08 16:51:19 +01:00
David Mann 848fa306f5 Merge pull request #12255 from SBaksa/patch-history-names
Patch: History names as the tool's (fixes #12117)
2026-11-08 15:25:52 +01:00
David MannandClaude Opus 5.5 1d5d94cf17 Background Eraser: document that Find Edges grades in this tool
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 15:13:28 +01:00
David Mann ec76a8f08a Merge branch 'fix/11901-bg-eraser-graded-alpha' into fix/11904-bg-eraser-find-edges-graded 2026-11-08 15:13:00 +01:00
David MannandClaude Opus 5.5 cbdce347f0 Background Eraser: Protect Foreground keeps the per-channel distance; tolerance doc
Only the sample match uses the measured increase-plus-decrease distance (#11901).
Protect Foreground Color keeps today's largest per-channel difference, as #11903
asks for its unmeasured cases. The tolerance doc describes the new distance and
the graded falloff.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 15:12:49 +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
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 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 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
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
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 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