Commit Graph
3891 Commits
Author SHA1 Message Date
Khawar Zamman Wani c66899e0a5 test: simplify selection fixtures for strict Clippy 2026-10-26 19:08:28 +05:30
Khawar Zamman Wani be43268ffa perf: crop Modify command mask conversion and selection replacement 2026-10-26 19:02:43 +05:30
David Mann 7e4ceba5df Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/cms/src/lutfile.rs
2026-10-26 14:26:50 +01:00
David MannandClaude Opus 5.5 6c2e90c8bb Address CodeRabbit review: Windows tests follow the SystemRoot fallback
The tests built the expected explorer.exe / reg.exe path from SystemRoot with unwrap(),
so they panicked when it was unset and ignored the C:\Windows fallback for an unset or
relative value. The rule is now a small pure function windows_root(value) in each crate;
the tests use it and check the absolute, unset, relative, rooted-without-drive and empty
cases without touching the process environment.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-26 14:22:38 +01:00
David Mann f78ab789e3 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/engine/src/canvas_geom/tests.rs
2026-10-26 14:12:47 +01:00
David Mann 7451739eef Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/ui-egui/src/canvas.rs
#	crates/ui-egui/src/wheel_nav.rs
#	docs/scorecard.md
2026-10-26 14:10:11 +01:00
David MannandClaude Opus 5.5 21d0ac3a10 Tests: a .pcraft smart object with a hostile SVG source does not abort Image Size or a PSD save
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-26 13:27:52 +01:00
mahefanante 8c2e269cf9 Fix: ajout des dernières modifications 2026-10-26 12:26:27 +00:00
David MannandClaude Opus 5.5 e47b2d8514 Windows: fall back to C:\Windows when SystemRoot is unset, as printing and fonts do
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-26 13:18:58 +01:00
David MannandClaude Opus 5.5 0a55ee65ef Windows: run explorer.exe and reg.exe by full path (#9666)
Reveal in Explorer and the CJK locale lookup started `explorer` and `reg`
by bare name, and Windows looks in the app's own folder first: an
explorer.exe or reg.exe next to a portable PhotoCraft ran instead.
Both now start from %SystemRoot%.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-26 13:14:01 +01:00
mahefanante 1eda417bdf Merge branch 'main' of https://github.com/storytold/photocraft into main 2026-10-26 12:02:41 +00:00
mahefanante df91a8555b Fix: ajout des dernières modifications 2026-10-26 11:44:01 +00:00
mahefanante 3d4c205881 Fix: résolution du conflit dans vector_cmds.rs 2026-10-26 11:25:44 +00:00
Daniel 5833b153e4 test(docs): preserve integrated Linux title bar and remove redundant NOTICE install 2026-10-26 11:57:37 +01:00
Daniel 56c7201055 fix(linux): retain integrated CSD as default title bar 2026-10-26 11:57:34 +01:00
jonathanwxh-cell 963bc8ab4e Merge upstream main into the action document-offset branch
Keep the #7103 opening-order note with main's newer gap status.
2026-10-26 10:06:28 +00:00
jonathanwxh-cell 9e81ec3576 fix(shapes): store CSH display names and report the group used
Localization keys such as $$$/Presets/Shapes/Tiger=Tiger were kept raw, so the Shapes panel showed the key. File → Open now reports the group the importer stored, including a suffix when that name was already taken.
2026-10-26 09:50:13 +00:00
jonathanwxh-cell 059940c993 Merge upstream main into the CSH shape import branch
Keep the custom-shape translations and the CSH import notes with main's newer format and gap status.
2026-10-26 09:50:13 +00:00
Khawar Zamman Wani 67666bdf72 bench(engine): add bench_sharpen_tool example 2026-10-26 14:33:41 +05:30
RickiNanoandClaude Opus 5.5 8103d35dee Prefs: startup reads the Performance section leniently, as the app does
Review (CodeRabbit on #9618): deserialising the whole performance section strictly meant one
wrongly typed value (say "cacheLevels": "four") reset Graphics Adapter to automatic at startup,
while the app, which loads the file through read_lenient (#6611), kept the user's adapter.
read_display_server had the same flaw.

prefs::read_section exposes the engine's lenient reader for one section; gpu_startup's
read_performance uses it for both the graphics adapter and the Linux display server. Tests: a
valid adapter and display server survive a malformed sibling value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 07:39:04 +01:00
Khawar Zamman Wani 6fc599dea9 Merge origin/main into save-for-web-webp 2026-10-26 10:20:32 +05:30
Khawar Zamman Wani 07549fd6a6 Merge origin/main into pen-path-operations 2026-10-26 10:20:27 +05:30
Khawar Zamman Wani 34b6a94b0c Merge origin/main into fix/6501-multi-layer-free-transform 2026-10-26 10:20:08 +05:30
Hector VillarrealandClaude Opus 5.5 d1c875072a fix(ui): the Color panel remembers its options across restarts (#9592)
The Color panel's mode, ramp, Web-safe ramp and edited chip were never
saved, so every launch reset them. They now live in the preferences
(colorPanel), written when they change and restored at launch next to
the dock layout, independent of workspaces.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 21:54:36 -06:00
Hector VillarrealandClaude Opus 5.5 46512521fe fix(engine): copied type keeps its size across resolutions after an edit (#9560)
Layers copied to another document were fitted to its mode, depth and
canvas but not its resolution: a type layer kept the source's point
size and box, so its next text edit re-laid it out at the destination's
dpi (24 pt from 72 to 300 ppi grew about 4.2 times). adapt_copies, used
by copy-to-document and paste, now applies the same compensation as an
Image Size resolution change (canvas_geom::set_resolution).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 21:16:19 -06:00
dotCooCoo 58d11d91ea Equalize: with a selection, choose the selected area only or the entire image based on it
Image > Adjustments > Equalize with an active selection now opens a dialog
with Photoshop's two choices. Equalize Selected Area Only, the default,
changes only the selected pixels, as Equalize did before. Equalize Entire
Image Based On Selected Area maps every pixel of the layer within the
canvas by the selected pixels' histogram.

image.adjustments.equalize takes selectedAreaOnly (default true), and a
script that passes it runs without the dialog. .atn save writes the Eqlz
step without this setting, so it refuses a step with selectedAreaOnly false.
2026-10-25 20:12:03 -07:00
Dylan M. Taylor d3b0a76c3f lint: drop blank lines after doc comments and attributes; tidy IME else, closure, shell tests (#9576)
- Remove blank lines between doc comments or #[test] attributes and the item (S8855, S8856)
- type_tool: drop the redundant else after continue in the IME event arm (S8862)
- ui_state: pass OsStr::to_os_string instead of an equivalent closure (S1612)
- macos packaging: [[ ]] for the attempt test (S7688); bind validate_staple's argument to a local (S7679)
2026-10-25 22:08:50 -04:00
GyoJoong Kum 55c3ee1038 Merge latest upstream main and resolve app lifecycle and documentation conflicts 2026-10-26 01:39:08 +00:00
aiongg da02d0ef2d Merge remote-tracking branch 'upstream/main' into docking-adopt
# Conflicts:
#	Cargo.toml
#	crates/ui-egui/Cargo.toml
2026-10-26 00:12:23 +00:00
aiongg cece50d513 Merge pull request #9386 from davidmann4/integration-batch-8
Integration batch 8: 37 reviewed community PRs on main
2026-10-25 20:04:41 -04:00
Federico Olivares 9f588ad085 Merge main into the integration batch 2026-10-25 20:42:06 -03:00
Dylan M. Taylor 3877bb1dbe chore: resolve SonarCloud maintainability issues (#9044)
* chore: resolve SonarCloud maintainability issues

* fix: format imports and fix effect_entry argument type

* fix: restore test closure and wildcard import that broke compilation

* refactor: split composite_to_surface to reduce cognitive complexity
2026-10-25 19:38:31 -04:00
Daniel 75a4764220 Merge latest upstream main and resolve GNOME Wayland control conflicts 2026-10-26 00:04:50 +01:00
dotCooCoo 1a456f7d76 Merge main into feat/layers-filter-by-smart-object
main's widgets::dropdown takes a label; the filter-type dropdown keeps
main's label and lists Smart Object after Mode.
2026-10-25 16:01:45 -07:00
0f8521851e Integration: Vanishing Point clone dabs stay on the canvas (#3281)
Clone strokes painted every dab where its points lay, up to 1e7 px off
the canvas: on the layer itself without "newLayer", and on the work
surface with it, so each far dab allocated up to 4096x4096 px of tiles.
A stroke with points [[100,100],[-30,100],[9e6,9e6]] on a 200x200
canvas painted 3 dabs and left pixels left of the canvas. The dabs are
now cut to the canvas before any read or write.

Found by CodeRabbit on #9386.

Co-authored-by: Valentin Klein <271991477+vangel76@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-25 21:56:00 +01:00
Federico Olivares 9f4290b0d0 Merge main into the integration batch 2026-10-25 17:31:11 -03:00
Dylan M. Taylor 669a7f8a94 feat(updates): add startup self-update prompt modal (#9322)
* 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.
2026-10-25 15:55:45 -04:00
David MannandClaude Opus 5.5 8812fe1e73 Merge main (egui 0.37, #9363)
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>
2026-10-25 20:53:11 +01:00
5c9192bbe2 Migrate PhotoCraft to egui 0.37 (#9363)
* 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>
2026-10-25 15:04:35 -04:00
David Mann 6baf1586ba Merge PR #1610: Art History Brush in the Y-group flyout 2026-10-25 19:50:57 +01:00
7e98763436 Integration: Art History Brush source sampling, History source, erased patches, silent no-op, Normal mode only (#1610)
- 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>
2026-10-25 19:48:32 +01:00
Phil TrinhandClaude Opus 5.5 4915f0970e PSD/PSB open without reading the whole file: channel data read as it is decoded, in bands straight into tiles (#5106)
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>
2026-10-26 02:37:20 +08:00
Hector VillarrealandClaude Opus 5.5 d78d7493d3 fix: an edit at full coverage keeps its result over huge 32-bit values (#9483)
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>
2026-10-25 12:03:01 -06:00
aiongg 292f869d8a Merge remote-tracking branch 'upstream/egui037' into docking-adopt
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	crates/ui-egui/src/gallery_ui.rs
#	crates/ui-egui/src/layer_props_ui.rs
#	crates/ui-egui/src/lib.rs
#	crates/ui-egui/src/panel_docking.rs
#	crates/ui-egui/src/panel_docking_tests.rs
#	crates/ui-egui/src/view_cmds.rs
#	crates/ui-egui/tests/it/batch_export_options.rs
2026-10-25 17:51:11 +00:00
Vlad Grankovsky 009c4fa612 Fix channel target context and native filter previews 2026-10-25 18:48:25 +01:00
Matt Van Horn 45c303ba5c Art History Brush: count only the sampling margin against coverage
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).
2026-10-25 10:47:09 -07:00
David MannandClaude Opus 5.5 9142a1036c Interface: remove the Enable animations preference (#9479)
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>
2026-10-25 17:34:31 +01:00
aiongg e3f242af38 Merge remote-tracking branch 'upstream/main' into docking-adopt 2026-10-25 16:25:21 +00:00
Khawar Zamman Wani 08909ac143 Merge origin/main into save-for-web-webp 2026-10-25 21:25:58 +05:30
Khawar Zamman Wani 18b32f1202 Merge origin/main into pen-path-operations 2026-10-25 21:25:26 +05:30