Adds the Swedish (sv) translation catalog with 100% UI coverage (2,013 / 2,013 measured keys + dynamic labels, 4,461 total catalog rows) following official Adobe Photoshop Swedish terminology. Registers the locale in LANGUAGES with plural_one_other and updates documentation.
* feat(updates): startup update prompt modal and direct self-updating
Release checks and the install go through craft-update's Updater: the engine's Help ▸ Check for Updates command keeps its status machine, its transport asks craft-update instead of a private GitHub client, and a found release opens the startup prompt. An install holds back while documents are unsaved, and a finished update closes through the guarded close path. craft-update stays out of the wasm build.
Ref: storytold/craft-libs#319
* fix(updates): address review feedback
Wake the UI when a manual check is queued from a menu callback; the update prompt owns the keyboard while it is open (LightCraft); Download opens through the desktop URL hook (FilmCraft); the Help menu dispatches through menus::invoke (FigCraft); print jobs and comment drafts hold an install back (WordCraft); Check for Updates is a registered command (GridCraft); an install holds back while documents are unsaved.
Conflicts: the batch's wheel reads (#5547 Animated Zoom) keep their extra
argument with main's ids (`Id::unique`, `ui.scope_id()`); crop presets keep
#6620's `apply_choice` with main's accessible name; Bevel & Emboss keeps
#9370's per-mode id with main's name argument; the Stroke field keeps
#7203's gradients with main's name; tone.rs keeps #9139's move of the
Histogram panel to histogram_panel.rs (main only renamed ids there);
translation catalogs as unions.
Not flagged by git, the batch's new code follows egui 0.37 too: dropdowns
take an accessible name (Histogram Channel/Source #9139, tool Mode #5504,
Art History Style #1610, New Snapshot From #3567), MouseWheel events carry
`source`, `WidgetType` is `Role` (ColorButton is ColorWell, #7203),
`Id::new`/`Ui::id` are `Id::unique`/`Ui::scope_id`.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A hard Blend If point at level c sits on Photoshop's 16-bit step
round(c * 32768 / 255), inclusive for black and white points (measured
at 1, 64, 128 and 200). blend_if_level snapped only within 1e-4 of a
whole level, so RGB16 32895 (level 128's step) read 127.996 and was
hidden by a black point at 128. A value on its nearest level's step is
now that level, on the CPU and the GPU; 8-bit levels are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* egui037: name each control for what it sets, and order the eager fonts for the UI
CodeRabbit review follow-ups on the migration: the Artboard X/Y fields, the CAF
dropdowns, the channel Solidity field, the GPU backend/adapter dropdowns, the
corner radius fields and the canvas extension colour all had an accessible name
that named another control (or was shared by four). The eager craft-fonts
registration now puts the UI Japanese face first, as the lazy loader does, so
Japanese UI is not drawn in the manifest's Mincho face and shared Han characters
do not take Japanese forms.
Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
* egui037: rustfmt the eager craft-font order
---------
Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
Co-authored-by: Codebuff <noreply@codebuff.com>
Bevel & Emboss grew taller than an 858 pt window (highlight and shadow
modes, colours and opacities), and the dialog ran off the bottom with
OK and Cancel. Its body now scrolls within the window height, as a long
filter dialog's does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Each tile still copied a source window of (tile +- halo) clipped to the
dab bounds, but a rotated read can land up to a dab diameter away: a
leftward drag [[110,40],[20,40]] at size 40 read empty pixels at x = 64
(seam), and a large click still copied about the whole dab per tile.
The stamp now samples the history state directly (no window, no
StampParams::halo), and bilinear reads at pixel centres, so an
unrotated dab copies the history pixel instead of a 2x2 blend.
- Tolerance compared colour only, so an erased patch (the Eraser keeps the
colour, lowers alpha 1 -> 0.6) was skipped at tolerance 25: the
difference is now the larger of the mean colour change and the alpha
change.
- The brush had its own history lookup (row 0 unless `state` was passed):
it now uses the History Brush's source (history.setSource, snapshots,
redo rows, refusal after a canvas size change).
- A stroke that wrote nothing at tolerance 0 (wholly outside the
selection, or on Lock Transparency over transparent pixels) failed
with "no stroke points"; it is now the same quiet no-op as a stroke
under the tolerance (damage null, no History step).
- A mode other than Normal (agents only: the options bar sends none)
blended each dab with the already-mixed result at full strength, so
Multiply with a white source over 0.5 grey fell to 0.33 five pixels
from a dab's centre instead of staying 0.5. Other modes are refused
until the stroke is buffered, and the wrong path is removed.
- TOOL-213-20 is partial (8 of 10 styles, Area scales spacing); docs follow.
Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
CodeRabbit on #9512 (inline 4371923258): the planner's clipped path
(atop_any) took the special eight's separate Fill too, while compose's
clipped branch (composite_atop) uses opacity × Fill as coverage, so a
clipped adjustment at partial Fill rendered differently on the GPU (53
levels off at 30% Fill). The clipped path now uses combined coverage.
Test: special_eight_fill_on_adjustment_layers_matches_cpu (adds a clipped
adjustment for each mode and Fill)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review follow-ups on #9162:
- a `txtu` path record must have a size of 12 + 2 * units matching its
length and end in one NUL; otherwise the filter stays opaque.
- the DspF path is used only when no DspD is embedded, so a damaged
embedded map stays opaque instead of falling back to the path.
- a path-only template writes to PSD only with its own mapPath, so the
exported PSD never names a map the render did not read.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CodeRabbit review follow-ups on the migration: the Artboard X/Y fields, the CAF
dropdowns, the channel Solidity field, the GPU backend/adapter dropdowns, the
corner radius fields and the canvas extension colour all had an accessible name
that named another control (or was shared by four). The eager craft-fonts
registration now puts the UI Japanese face first, as the lazy loader does, so
Japanese UI is not drawn in the manifest's Mincho face and shared Han characters
do not take Japanese forms.
Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Opening a 2.14 GB PSD (2000×2000, 109 layers, 821 MB of embedded smart objects) peaked at
7.28 GB and took 6.8 s; it now peaks at 3.00 GB and takes 3.6 s (macOS peak memory footprint,
`cargo run --release -p photocraft-io --example psd_open_mem`).
- photocraft-psd: `PsdFile::from_source` parses from a `ReadAt` source (`FileSource`: pread /
seek_read in bounded reads). Channel data and the merged image become `Stored` ranges read
when decoded; the model equals `from_bytes`'s and writes back the same bytes (tests compare
the two on every generated file, including Lr16/Lr32 layer blocks and truncated files).
- `ChannelData::row_decoder` decodes any band of rows: RLE via its row table (a stored channel
reads only the band's bytes), raw by offset, ZIP inflated once.
- photocraft-io: `import_file` opens a path; PSD/PSB through `from_source`, other formats read
whole. Layers decode in bands of whole tile rows (~32 MB) into tiles: no whole-layer plane or
interleaved buffer. Global blocks move into the document instead of being copied; finding an
embedded smart object no longer copies every file in `lnk2`.
- photocraft-raster: `Surface::share_uniform_tiles` + `TileInterner`; the PSD import shares
single-value tiles (backgrounds, fill caches, masks) across layers.
- The background open job and the CLI/MCP (`automation::files::open`) use `import_file`.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reconcile 39 upstream commits: keep main's off-menu gallery zoom, folder-field
picker and Transform edit tolerance while keeping the migration's accessible
names, and use Id::unique for the ids main added.
The Windows legs build with the suite's craft-fonts input: the runner has no
Japanese or Simplified Chinese system font, and egui 0.37 panics on a missing
glyph, which failed the localized UI tests. The background-redraw test now
holds the worker after its first batch, so an edit during a redraw cannot lose
the race on a fast machine.
Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
egui 0.37 keeps a panel's size under its parent's scope, reports an immediate viewport's commands from its own pass in that pass's output, and deprecates Id::new for Id::unique (same hash).
Below 100% Fill, Photoshop blends Color Burn, Linear Burn, Color Dodge,
Linear Dodge, Vivid Light, Linear Light, Hard Mix and Difference with
the source pulled toward the mode's neutral colour, at Opacity. Pixel
layers already did (psblend::composite_fill); adjustment layers used
Fill as coverage on the CPU (blend_back) and the GPU (AdjMix), so a
40% Fill Color Dodge gave (90,179,217) instead of (80,160,240).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adjustment layers (compose blend_back), destructive edits
(mix_through_selection) and plug-in filters mixed their result back as
o + (r - o) * k. In f32 the difference had already rounded a small
result away against a huge backdrop, so a Color Lookup's 0.1 over 2^20
came out 0.125, and 0.5 over 1e8 came out 0. They now compute
o * (1 - k) + r * k, which is exactly r at full coverage.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CodeRabbit on #9504 (inline 4371715685): when Undo restored settings with
capture on, the reset to off (and the dialog then dropping its capture
modifiers) differed from the step's settled settings, so the next frame
recorded it as a new edit and cleared Redo. The reset now also drops
captureMods, as the dialog does, and updates the settled settings.
Test: cmd_z_is_recorded_while_capturing_and_undoes_otherwise (adds Redo)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stamp now reads each dab's bounds plus one pixel, but the coverage
check still inflated the stroke bounds by the full halo, so a single
Loose Curl click of size 1400 or more on a 2600x2600 canvas failed with
"stroke too large". Inflate by one pixel instead, and add a test for
size 2000 Loose Curl and size 2400 Tight Medium clicks.
Also make the documented tolerance default match the engine's (0).
The dialog's own Cmd+Z history (#4697) took Cmd+Z while a shortcut
field waited for keys and undid the click that started the capture, so
Cmd+Z could never be bound. While a field captures, Cmd+Z now reaches
it like any other key; outside a capture it still steps the dialog
back, and a step back no longer leaves a field waiting for keys.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Windows integration job aborted in photocraft-gpu's
parity::soft_shapes_match_the_cpu with 0xc0000374 (heap corruption) inside
the Microsoft Basic Render Driver (DX12 WARP); this PR only touches the
text crate.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CodeRabbit on #9493 (inline 4371628901): a worker whose line buffers
couldn't be reserved left its rows unblurred while the rest of the plane
was blurred, a half-feathered mask the cache would keep. Every worker's
buffers (rows and columns) are now reserved, with the transpose, before
the plane is touched; failing that, the sequential path runs, which also
reserves first and otherwise leaves the plane as it was.
Test: a_failed_line_buffer_never_leaves_a_half_blurred_mask
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The open scroll brings the marked row itself into view, keeping the recent
group's top in view when the row fits below it: with Font Preview Size Huge
and 10 recents, recent #8 opened below the fold.
- The open scroll is armed for the first laid-out pass only, whether or not a
row matched: with a missing font or a mixed selection the scrolled list
jumped later, once the font loaded or the selection settled.
Co-authored-by: hectorviov <1501713+hectorviov@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
CodeRabbit on #9493 (inline 4371565312): the edge halo was built as a
padded copy of the whole plane, 3(r + 1) samples a side; at a 1000 px
feather a 6000 × 6000 mask needed a 12000 × 12000 plane and its transpose,
far past the 512 MiB working-set budget. Each row, then each column, is
now continued past its ends on its own, which gives exactly the same
result: the blur needs the plane's transpose and one padded line per
worker, and the per-worker buffers are reserved fallibly.
Tests: a_maximum_feather_does_not_pad_the_whole_plane (largest buffer
for a 400 × 400 plane was 40,960,000 floats before),
padding_each_line_matches_padding_the_plane (bitwise)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
FredApps' re-review: hanging_marks_of_a_split_run_keep_their_breaks was
pinned by the chain guard, not by the at-most-two-cluster cap — reverting
the cap alone surprised every hanging test. a_full_mark_row_does_not_
step_back_onto_a_short_line pins the cap: 'word ' followed by thirty
hyphens in a 200 px box keeps three rows and the same geometry as
hanging off; with the cap reverted the full mark row steps back and the
line overflows the box by a row's worth of marks (test fails). The
split-run test's comment now matches its 34 dots.
CodeRabbit on #9478 (outside-diff comment, layout.rs 763-782): standard,
contextual and discretionary ligatures stayed on in upright roman runs,
so a font's "fi" became one glyph and broke one letter per em. They are
off there now, as kerning already was.
Test: upright_roman_letters_stay_apart_without_ligatures (uses an installed
font with an fi ligature; skips where none is found)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The feather blur clamped every one of its box passes at the plane's
edge. Where the canvas cut a feathered mask off, each pass repeated the
already blurred values there, brightening the edge (12 levels at a
32 px feather) and making the result depend on the canvas size.
The blur now pads the plane with its edge values by the passes' reach,
blurs, and keeps the original area, which matches Photoshop within one
level both for a mask black at the edge and one white up to it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Photoshop has no general animation setting (its only motion settings are
Animated Zoom, Flick Panning and Overscroll in Preferences > Tools), so
Preferences > Interface > Enable animations goes:
- interface.enableAnimations leaves the prefs model. Saved files that
still have it load whole (unknown keys are ignored, nothing is reported
as invalid); prefs.set/prefs.get on it are "unknown preference" errors.
- sync_animations is gone: egui's fades and scroll-area glides keep
egui's defaults everywhere.
- The canvas wheel pans without egui's glide, as Photoshop does
(measured: one notch moves the view in a single frame, nothing after).
The unsmoothed pan now folds Shift and Cmd/Ctrl sideways the way egui
does, so Ctrl+wheel still scrolls sideways (the old Enable animations
off path dropped it). Liquify and Camera Raw previews keep read()'s
smoothed pan, so read_with keeps its smooth parameter.
- The label leaves the 20 i18n catalogs; scorecard UI-217-10 no longer
lists an animation toggle; docs/scorecard.md regenerated.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
sign.ps1 downloaded Microsoft.Trusted.Signing.Client from the unversioned
NuGet URL and loaded its dlib into signtool, next to the Azure signing
secrets, with no version or integrity check.
Download a pinned version (1.0.95, which the unversioned URL serves today)
and refuse it unless its SHA-256 matches, so upgrading the client is a
deliberate change in the repository. The release docs say where the pin
lives.