Commit Graph
11425 Commits
Author SHA1 Message Date
Trevor BrownandClaude Fable 5.1 27e075099e Magnetic Lasso: fastening points are spaced as the reference measures (#11687)
With the button held a point fastens every floor(40 - 0.35 x Frequency) screen px, with it up every 4 x that + 4. The pointer tracks whether the button is down.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-06 14:57:52 -05:00
Trevor BrownandClaude Fable 5.1 89e75c4513 Magnetic Lasso: Shift+[ and Shift+] jump to the width limits (#11688)
keys() consumed only Modifiers::NONE brackets, and egui's logical match lets those take Shift+[ / Shift+] too, so they stepped by 1. The Shift variants are now consumed first and set Width to 1 / 256.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-06 14:56:05 -05:00
DingusMcRinkyDinkyandClaude Opus 5.5 0b66e8f00c path.toShape: its path is a vector path, not a host file
The automation registry check takes a `path` parameter for a host file
unless the command is listed as taking a document vector path, as the
other path commands are. path.toShape's `path` is the inline path being
drawn, so it belongs in that list; integration batch #11643 failed on it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EZbgszHyuEuWAzxaamteuU
2026-11-06 20:55:12 +01:00
David MannandClaude Opus 5.5 0b3b3e470b direction tests: ignore the env override, check glyphs only with craft-fonts
Unit tests no longer read PHOTOCRAFT_UI_DIRECTION (cached per process, so a
developer's shell could flip the Hebrew/Urdu and shell assertions). The
Hebrew/Urdu test checks glyphs only when craft-fonts carries a face for the
script (the eager provider draws it in the first frame, as in CI with
CRAFT_FONTS_REQUIRED); without it the harness allows tofu and only the
mirroring is checked, instead of panicking on a host without the fonts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 20:52:58 +01:00
Trevor BrownandClaude Fable 5.1 9499e2fd37 Magnetic Lasso: tests for the fastening-point spacing (#11687)
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-06 14:49:29 -05:00
Trevor BrownandClaude Fable 5.1 c9ac0d5e73 Magnetic Lasso: tests for Shift+[ and Shift+] width limits (#11688)
Shift+[ must set Width to 1 px and Shift+] to 256 px, with and without a border being drawn; plain [ and ] still step by 1 within 1-256.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-06 14:49:28 -05:00
Zinadin Zidan 998d788f31 Shapes: a selected shape's box resizes from anywhere along a side (#11473)
Only the eight handle squares took a press. A press on a side line, or up to
5 screen points outside it, now scales that side about the opposite one,
and the handle squares keep priority. A press there that lands on another,
unselected shape goes to the tool, so that shape can still be selected or
drawn from.
2026-11-07 01:44:10 +06:00
Trevor BrownandClaude Fable 5.1 d8bce6b97d Move gear: the marker getter names the direct-write exception too (#11381)
Doc only: the getter's comment now says, as the field's does, that a direct write to DocState::active_layer through active_mut() bypasses the change marker.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-06 14:40:19 -05:00
Triwarr 36e7c50178 PDF: transform imported paths by their object matrix
- Apply PdfPageObject::matrix() to path segments: PDFium returns raw object-space points, so scaled or rotated paths landed in the wrong place.
- Flip path y with the page height in pixels, not points; paths were off-canvas at any DPI other than 72.
- Take fill and stroke presence from the path's draw mode: stroke-only paths no longer get a black fill, and paths that are neither filled nor stroked are skipped.
- Estimate import pixel memory as retained tiles (4 B/px over all pages) plus the converting page's peak (24 B/px), defaulting to a 2 GiB budget when the caller sets none. Reuse the RGBA copy and reserve the f32 buffer fallibly.
2026-11-06 20:34:01 +01:00
yoriswind 90c03eba39 Format Free Transform corner fallback 2026-11-06 11:30:26 -08:00
yoriswind 393ccdc124 Match measured Free Transform edge handle zones 2026-11-06 11:25:47 -08:00
RickiNano 14a27b360f Magnetic Lasso: a right-click while drawing opens no menu (#11689)
With a Magnetic Lasso border in progress, a right-click on the canvas
opened the selection tools' menu over the live border, in the window and
over the control channel. As in Photoshop, it now opens nothing and the
border stays live: Enter or Esc still close or cancel it. With no border
in progress the menu opens as before. Cmd/Ctrl+right-click (the layer
list) is unchanged, since it was not measured.

Tests in crates/ui-egui/tests/it/magnetic_lasso_right_click.rs drive
both paths; the two "while drawing" tests fail without the fix.
2026-11-06 20:18:16 +01:00
Sven Carstensen 779a27e7fb Limit guide dialog changes to keyboard editing and exact positions 2026-11-06 20:14:37 +01:00
Triwarr adbe906eaf PDF: fix CI packaging and CodeRabbit findings
- Stage pdfium.dll for the MSI fixtures (install-policy payload) and for the real package
  stage/portable zip; the package script downloads it before cargo.
- Regenerate docs/scorecard.md for the new Preferences fields.
- Text y positions convert the page height to pixels; invisible PDF text stays hidden.
- Page ranges that start past the PDF are refused; zero first/last bounds are independent.
2026-11-06 20:11:03 +01:00
Hartmut Nörenberg 9a7ec924ab docs: regenerate the parity files after merging main
cargo xtask parity and scorecard on the merged tree: 661 of 661 menu items live (Layer 162 of 162, so the Reset Transform row is counted live), and the prefs audit is 10 of 191 now that upstream removed the Enable animations preference.
2026-11-06 20:07:59 +01:00
Cristi RaduandClaude Opus 5.5 20900a5432 Say what an unset maximizeCompatibility does in app.save (#8064)
Unset or null follows Preferences › File Handling: Always and Ask When Saving
write the real merged image, Never the placeholder, and app.save opens no dialog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 21:07:10 +02:00
Cristi RaduandClaude Opus 5.5 0c449729d7 Say Bitmap, Indexed Color and Duotone keep the merged image (#8064)
The PSD writer always writes the real merged image for those modes (Bitmap and
Indexed are saved without layers; Duotone is exempt), so maximizeCompatibility
false does not give them the placeholder. The MCP params, control protocol and
CLI help now say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 21:07:10 +02:00
Cristi RaduandClaude Opus 5.5 294ffa28d9 doc_export_layers takes maximizeCompatibility for PSD/PSB layer files (#8064)
ExportLayersParams refuses unknown fields, so an MCP caller could not pass the
option Layers to Files already honours. It is now accepted and forwarded; unset,
the preference decides as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 21:07:10 +02:00
Cristi RaduandClaude Opus 5.5 a1bb9f003f Saves take maximizeCompatibility for a PSD/PSB's merged image (#8064)
Photoshop's Maximize Compatibility checkbox, for one save: `maximizeCompatibility`
(true or false) on Save, Save As, Save a Copy, `app.save`, serve `doc.save`, MCP
`doc_save`/`doc_export`, Batch, Image Processor and Layers to Files decides the
merged image over Preferences > File Handling > Maximize PSD and PSB File
Compatibility; unset, the preference decides. Anything but a boolean is refused
before anything is written. The CLI takes `--no-maximize-compatibility`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 21:07:10 +02:00
RickiNano 265fedc687 Merge remote-tracking branch 'origin/main' into fix/windows-pen-eraser-end-2285
# Conflicts:
#	apps/photocraft/src/tablet.rs
#	crates/tablet/Cargo.toml
#	crates/tablet/src/lib.rs
#	crates/tablet/src/windows.rs
#	crates/ui-egui/src/lib.rs
#	crates/ui-egui/src/services.rs
#	docs/hardware-parity.md
2026-11-06 19:53:07 +01:00
Trevor BrownandClaude Fable 5.1 2e4ced2469 Move gear: active_layer_changes is a change marker, not an exact count (#11381)
Session::active_layer_changes now documents its contract: it advances at least once whenever the active document or layer changes, so callers compare two readings for equality. A file.new or a document close may advance it twice (add_document and execute both note it); removing that is not a one-liner, so the wording covers it. Adds a test that file.new advances the marker and a same-layer select_layer does not.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-06 13:45:24 -05:00
RickiNano 1aa85bd796 Windows: the pen's eraser end selects the Eraser (#2285)
The pointer hooks read PEN_FLAG_INVERTED from GetPointerPenInfo and
report the pen end through Services::pen_end, so flipping the pen
switches to the Eraser and the tip restores the previous tool, as on
macOS. A WH_CALLWNDPROC hook beside WH_GETMESSAGE catches
WM_POINTERLEAVE, which Windows documents as sent, not posted.
PEN_FLAG_ERASER alone is an eraser button on the barrel and does not
switch tools.
2026-11-06 19:45:17 +01:00
David MannandClaude Opus 5.5 e078c560ec Address CodeRabbit review: task bar tile, inspect and ui.set merge
- Draw the Crop task bar only on the active document's tile: a click into
  another tile activates its document mid-pass, and the tile drawn after it
  put the new frame's bar on itself for that frame.
- ui.inspect reports the bar hidden (and no rect) as soon as it can't show,
  not only after the next draw.
- ui.set merges panels.task_bar field by field: {"at": [x, y]} keeps a pin,
  {"pinned": true} keeps a dragged place; unknown nested fields are refused.
- Tests for each (each fails with its fix reverted), plus the task bar's
  preset dropdown picking 1 : 1 in sync with the options bar.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 19:41:21 +01:00
David MannandClaude Opus 5.5 5d5519dcac Regenerate docs/scorecard.md after merging main
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 19:41:20 +01:00
95c7a5d17e Batch fix-up: path.toShape (#11005) takes a document vector path, not a file
The automation registry check reads a `path` param as a host filesystem
path unless the command is listed as taking a document vector path, as
path.set is. #11005's new path.toShape takes an inline vector path, so it
joins that list; CI failed registry_filesystem_path_params_are_classified.

Co-Authored-By: DingusMcRinkyDinky <DingusMcRinkyDinky@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 19:39:16 +01:00
Cristi RaduandClaude Opus 5.5 53917dc175 Preferences: Skip Transform when Placing (#8492)
Preferences > General > Skip Transform when Placing (off by default), as in
Photoshop: a placed or dropped file lands without Free Transform. It is
checked in begin_placed, which every interactive place reaches, so drops
still go through main's background place job (#10147) and queue; with the
preference on, the next queued file starts as soon as one lands.
Scripted file.placeEmbedded/placeLinked never open Free Transform, so the
preference doesn't affect them. Label translated in every catalog that
translates the neighbouring place preferences (all but hi).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 20:38:19 +02:00
Triwarr 84644de102 PDF: expose the page range as two Preferences numbers 2026-11-06 19:36:49 +01:00
Hartmut Nörenberg e5d597f6e7 Merge remote-tracking branch 'upstream/main' into feat/reset-transform-smart-object-11662
# Conflicts:
#	docs/ui-parity.md
2026-11-06 19:36:36 +01:00
Triwarr fb66c11df6 PDF: CodeRabbit SVG signature fix, sampled text colour, Preferences page fields
- A PDF named .svg now keeps the PDF importer; other signatures beat the .svg suffix fallback (regression test).
- Text layers sample their fill colour from the rendered page and use the PDF font family/name.
- File Handling preferences expose pdf_dpi, pdf_first_page and pdf_last_page; the page range maps to ImportOptions.pdf_pages.
2026-11-06 19:35:02 +01:00
dotCooCoo c0c49533eb Merge main into feat/hand-scroll-all-windows 2026-11-06 10:32:00 -08:00
Zinadin Zidan fc94ac59e2 Saving: the temporary file is no longer a dot file (#11624)
A save writes a temporary file beside the document and renames it over the
document. Its name started with a dot, and an SMB server that hides dot
files marked it hidden. The mark survived the rename, so the saved document
was hidden in Finder. The name is now <file>.<pid>-<n>.pcsave.tmp. Leftovers
are recognised, and swept from the recovery folder, under both the old and
the new name.
2026-11-07 00:27:13 +06:00
David MannandClaude Opus 5.5 d7e66606ad Address CodeRabbit review: Turkic I text, type-ahead language change, RTL coverage
- zoom field: a menu's I key drops İ/ı text whatever the UI language (the keyboard layout is
  not the interface language).
- dropdown type-ahead: one entry per list tagged with its language, cleared on any frame in
  another language, so a prefix never carries over a quick switch and back.
- Hebrew and Urdu: live shell test selects each catalog, checks mirroring and glyphs.
- Azerbaijani restart test resets the drawing language before the restarted shell loads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 19:27:11 +01:00
David MannandClaude Opus 5.5 da7690e937 Camera Raw localization test: allow tofu only for Tamil until craft-fonts ships it
The pinned central font manifest has no Tamil face (storytold/craft-fonts#63 adds one) and the
Linux runner has none installed, so the strict missing-glyph policy panicked on the Tamil
labels. Tamil keeps every label and state check; a guard fails once the manifest ships Taml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 19:27:10 +01:00
Firstbober 7f96ce5343 Preserve Indexed profiles and preview current tool colors 2026-11-06 19:26:52 +01:00
David Mann d1d913e7e6 Merge remote-tracking branch 'origin/main' into feat/crop-task-bar-10890 2026-11-06 19:24:17 +01:00
Triwarr 244a6287ab PDF: import options (page range, DPI, editable text/vector) and DLL packaging
- ImportOptions gains pdf_pages (1-based inclusive), pdf_text and pdf_vectors;
  the importer maps PDF text objects to editable text layers and vector paths to
  shape layers through the effective DPI.
- photocraft-cli convert gains --pdf-dpi and --pdf-pages.
- Preferences gain pdf_dpi/pdf_pages, wired through jobs::import_options.
- apps/photocraft/build.rs copies PDFIUM_DLL beside the exe; the MSI installs it.
2026-11-06 19:15:09 +01:00
Triwarr 06a6442076 PDF: SVG precedence, hidden artboards, export budget, writer cancellation 2026-11-06 19:15:08 +01:00
Triwarr ef7699ae9a PDF: render each artboard rect instead of a whole-document crop 2026-11-06 19:15:08 +01:00
Triwarr b1870f1950 PDF: second CodeRabbit round (render size, buffer estimate, label tree) 2026-11-06 19:15:08 +01:00
Triwarr 94a4998208 PDF: address CodeRabbit review (cancellation, budgets, labels, export edges)
- Cancellation: the importer and the PDF writer take the Interrupt and check between pages.
- Physical size: the effective DPI keeps each page print size when budgets cap the raster.
- Oversized pages: final dimensions are checked before rendering.
- Memory: pages go straight into layer surfaces; the aggregate pixel estimate is admitted.
- Labels: /PageLabels (UTF-16BE) carry artboard names; no label is drawn outside the media box.
- Metadata: the artboard export warns when free-form text metadata is dropped.
- Export: hidden groups report their children; non-string modes are rejected; case-insensitive
  filename collisions are suffixed.
- Dispatch: a recognised raster renamed .pdf goes to the flat importer; .ai keeps its path.
- Platform: the PDFium recovery message names the actual library.
2026-11-06 19:15:08 +01:00
Triwarr 3a1b41f0c6 PDF: bound the import canvas
The importer budgets the per-page raster (100 M px) and the artboard strip (200 M px): an
oversized page is scaled down, and pages that would exceed the strip budget are skipped with
a warning, instead of allocating a multi-gigabyte union canvas. The page-count cap stays 16.

Also applies cargo fmt to the new PDF code and the export-recursion test.
2026-11-06 19:15:08 +01:00
Triwarr c1662d4911 Export: split nested groups into separate layers/files
file.export.layersToFiles gains groups: layers (walk every visible leaf at any depth, not only top-level layers) and naming: layer (bare <layer>.png names; duplicates get -2). This is the recursive folder export from the local Program Files build, brought in as the second fix on this branch.

Tested: layers_to_files_exports_group_children_as_loose_files (nested subgroup + sibling).
2026-11-06 19:15:08 +01:00
Triwarr 399cd6ea4d PDF: import every page as an artboard; export a page per artboard
The PDF importer renders each page with PDFium at the import DPI (default 300), lays the
pages out side by side and wraps each in an artboard, so a 2-page PDF opens as 2 artboards
and saves back as a 2-page PDF (one page per artboard, page-sized, labelled). The import
caps at 16 pages for now.

The PDF writer now takes a list of pages: shared font/ICC/selection objects, one image per
page, and the existing one-page export is the single-page case. Artboards with vector/text
layers are rasterised in this path.

Tested: artboards_export_as_one_page_each; convert sample.pdf app-multi.pdf (2 pages),
rendered back with the probe.
2026-11-06 19:15:08 +01:00
Triwarr 95c9d3c9eb PDF import: open the first page with PDFium
File > Open, drag-and-drop and photocraft-cli now accept PDF files. The first page is
rendered with PDFium at 300 dpi (ImportOptions.pdf_dpi), built through the flat
importer, and the document resolution keeps the page's print size. The page count is
reported; multi-page import is the next step (#2541 / FILE-215-10).

- crates/io: pdf_import module, native-only pdfium-render + image deps, import and
  preflight dispatch (.ai keeps its existing path).
- PDFium loads from the executable's folder or PDFIUM_DIR.
2026-11-06 19:15:07 +01:00
Firstbober 2fbec8b533 fix: preserve document colours for indexed mattes 2026-11-06 19:14:59 +01:00
Firstbober b57ec9f729 fix: preserve indexed matte when picker is canceled 2026-11-06 19:14:59 +01:00
Firstbober 3a7a0aaa1e feat: add Indexed Color matte control 2026-11-06 19:14:58 +01:00
David Mann 670fa8b5f1 Merge remote-tracking branch 'origin/main' into integration-batch-20
# Conflicts:
#	crates/ui-egui/src/prefs/prefs_ui/fields.rs
2026-11-06 19:01:38 +01:00
David MannandClaude Opus 5.5 af0ae88bad Batch: drop #9876 (New Guide unit dropdown) from the batch
The reference application's New Guide dialog has Orientation, Position
(a text field that takes typed units such as "2 cm") and Color, but no
unit dropdown; measured on 2026-11-06. Typed units already work on main,
so the PR only adds something the reference lacks.

This reverts merge 22e03d0bcb.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 18:54:34 +01:00
AethelisDEV c3f825eed5 ui-egui: support native file drag and drop on Wayland 2026-11-06 20:52:19 +03:00