Commit Graph
145 Commits
Author SHA1 Message Date
Michael Higginsandkayrockscreenprinting 6a676ee1be Save over a flat JPEG: JPEG Options, then in place; transparent ones offered as PNG (#2223)
Fixes #2223. Carries the in-place flat Save of #5865 (closed as superseded by this PR) and revives what #2515 (@kayrockscreenprinting, closed when its author stepped away) added beyond it.

File › Save now writes back over a flat file when that file still holds the document: one plain opaque layer the format can store, and only when the file held a single image. A JPEG (and a TIFF, Targa or DDS) asks its format options first, as Photoshop does; Cancel writes nothing. A JPEG whose lone layer has transparency it can't keep is offered as a PNG. Multi-image files (animations, multi-page TIFFs, multi-size icons, multi-part EXRs) still go through Save As; the source image count is kept through crash recovery.

Co-authored-by: kayrockscreenprinting <257643019+kayrockscreenprinting@users.noreply.github.com>
2026-11-10 20:26:48 +01:00
2ec3ecf243 Type: render a paragraph-box handle drag off the UI thread (#7032) (#12316)
* Type: render a paragraph-box handle drag off the UI thread (#7032)

While a box handle is dragged the document is left alone: each move
records the wanted box, a worker lays out (holding the shared text engine
only for layout) and rasterizes a copy of the layer, and the canvas shows
the document with the newest finished render. One render runs at a time
and the latest box wins. Releasing, committing or any other end of the
drag applies the box with the same type.edit as before, so the final
document and its single history step are unchanged. Without background
jobs (web, tests, scripts) every move still runs type.edit.

* Address review: end a box drag before other commands, on a stale preview and for Type Mask edits

- A command other than a view command (Free Transform, a menu item, a
  shortcut) applies the dragged box and ends the drag before it runs.
- A preview gone stale (the document changed some other way) ends the
  gesture instead of applying the press-time box over that change.
- Type Mask edits keep the synchronous drag: their overlay is drawn from
  the document's layout.
- apply_box keeps the stored size finite and documents its units.
- Tests: a width drag that rewraps, each of the above.

* Address review: Free Transform and Save mid-drag see the dragged box

UI_COMMANDS is every shell-handled command, not only view ones, so the
exemption skipped edit.freeTransform and file.save. Only view., window.
and help. commands now leave a box drag going. Adds a Free Transform test
and requires a box shape when the huge-box edit succeeds.

* Address review: the Free Transform test checks the command succeeds and its frame is the resized layer's

* Address review: only listed view commands leave a box drag going

view.clearSelectedGuides edits the document, so a prefix exemption for
view. commands let it make the preview stale and lose the dragged box.
The exemption is now an explicit list of commands that change nothing in
the document, and a test covers the guide command.

* Address review: switching documents, engine.execute and app.save end a box drag first

- window.* commands are no longer exempt: window.nextDocument and
  window.previousDocument switch documents mid-drag.
- The control channel's engine.execute (engine commands) and app.save
  bypass menus::invoke, so they end the drag themselves.
- Tests: a control engine.execute and app.save mid-drag, and a document
  switch mid-drag.

* Address review: panel toggles leave a box drag going

Opening or closing a panel (Cmd+T toggles the Character panel while
typing) only lays out windows, so window.panel.*, window.toggle.* and
type.panels.* no longer end a drag. A test covers three of them.

* Address review: doc comments on the functions this change touches

CodeRabbit's docstring coverage check was at 73.68% against 80%. Adds a
doc comment to each touched function that had none: the new helpers and
tests, and the existing functions this change edits.

---------

Co-authored-by: FredApps <FredApps@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 17:38:56 +01:00
David Mann c87a538fe2 Merge remote-tracking branch 'origin/main' into pr-6083 2026-11-09 19:01:58 +01:00
Tim BrittandClaude Fable 5.1 5872941b12 Warp mode: the cylinder's grid and handles as the reference's, and a stored warp previews unwarped (#9798)
The cylinder is outlined and cut into a 3 × 2 grid (two horizontal curves and
the centre line) that hugs the warped picture. The handle in the middle of the
upper arc sets the bend of both arcs, the one in the middle of the lower arc the
lower edge's height, and the wrap handle sits at the grid's centre and slides to
the right (starting 15 % along), stretching the middle of the picture and
squeezing its sides round the back.

A smart object's stored warp used to enter Warp mode with the layer's already
warped render as the preview texels, which the mesh then warped again, so the
picture never sat on the grid: the session now previews the source placed
without the warp over the warp box. Edit › Transform › Warp carries a check
while the active layer is warped, as the reference's does.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-09 04:36:43 +00:00
David Mann a76bb72b1f Merge pull request #10569 from hectorviov/feat/layer-copy-css
Layer › Copy CSS
2026-11-09 00:17:21 +01:00
David Mann a879c6ac0a Merge main into #10569
# Conflicts:
#	crates/ui-egui/src/menu_catalog.rs
2026-11-08 20:20:12 +01:00
71acb4c47e native menu: test that an imported .kys set owns the system keys it binds (#7809)
Review on #7809 asked for coverage of imported .kys bindings. The set moves
Cmd+M to Levels and gives Fill Cmd+, as its second key; the menu bar shows
Cmd+M on Levels only, Minimize keeps Ctrl+Cmd+M, Settings yields Cmd+, and
the clash is reported. Fails without app_layout's dispatch ownership pass.

Co-Authored-By: andeecollard <6765611+andeecollard@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 18:51:44 +01:00
David Mann 4e0b455683 Merge remote-tracking branch 'origin/main' into pr-7809
# Conflicts:
#	crates/ui-egui/src/menus/native_menu.rs
2026-11-08 18:51:35 +01:00
David Mann 8500fd729a Merge remote-tracking branch 'origin/main' into pr-6083 2026-11-08 17:36:27 +01:00
Hector VillarrealandClaude Opus 5.5 fa5dfb3e19 Regenerate the parity checklist
Main added a Layer menu item of its own, so after the rebase the menu
counts 663 items; raise the floor to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 23:23:58 -06:00
Hector VillarrealandClaude Opus 5.5 4cd60bc06b Layer › Copy CSS
Photoshop's Layer › Copy CSS puts CSS for the selected layers on the
clipboard. The new engine command layer.copyCSS writes each layer as a
class named after it (characters CSS doesn't allow become _): a type
layer's font size, family, colour, line height and alignment, a solid
fill or shape's background colour, or an image named after the layer;
then its opacity under 100 %, its absolute position and size (none for
type) and its z-index from the bottom, in Photoshop's format and order.
The Layer menu item copies the result to the clipboard.

Fixes #9372

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 23:23:58 -06:00
Trevor Brown 585408de67 Merge remote-tracking branch 'upstream/main' into feat/open-as-smart-object-11678 2026-11-07 19:51:04 -05:00
David Mann c9204e7c45 Merge remote-tracking branch 'origin/main' into pr-6083 2026-11-08 01:27:02 +01:00
David Mann 49eabafbcb Merge pull request #11238 from NaufalDzz/layer-filter-find-layers
Select › Find Layers opens the Layers panel's Name filter (#10884)
2026-11-08 00:13:30 +01:00
David Mann 6c9031da01 Merge pull request #10429 from hectorviov/fix/path-selection-chords
Paths: ⇧⌥⌘↩ intersects the path with the selection (#7726)
2026-11-07 23:22:16 +01:00
Trevor BrownandClaude Fable 5.1 e2471998de File: Open as Smart Object... opens the same file dialog as Open and takes several files (#11678)
The menu item with no path asks with File > Open's dialog (multi-select) and opens each chosen file as its own document; failures are reported as File > Open reports them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-07 17:08:24 -05:00
David Mann 0f0e76c44b Merge remote-tracking branch 'origin/main' into pr-11238
# Conflicts:
#	crates/ui-egui/src/panels/layer_filter_ui.rs
#	docs/control-protocol.md
2026-11-07 19:37:29 +01:00
David Mann 90cdaa615d Merge pull request #10695 from Lcoding15/feat/arrange-drag-borders
Window > Arrange: drag the borders between arranged documents (#10101)
2026-11-07 19:14:43 +01:00
dotCooCoo e207210745 Merge main into feat/equalize-entire-image 2026-11-07 08:24:11 -08:00
David Mann f3f1610750 Merge remote-tracking branch 'origin/main' into pr-10429
# Conflicts:
#	crates/engine/src/cmd/vector_cmds.rs
2026-11-07 16:03:16 +01:00
David Mann 6d1a675ab7 Merge remote-tracking branch 'origin/main' into pr-10695 2026-11-07 15:59:38 +01:00
David Mann e42c4d97c9 Merge remote-tracking branch 'origin/main' into pr-6083
# Conflicts:
#	crates/ui-egui/src/dialogs/guide_layout_ui.rs
2026-11-07 15:45:09 +01:00
David Mann 0eb51ace19 Merge pull request #8239 from nikolainyegaard/vocab-parity
Labels: match Photoshop's menu, tooltip and spelling conventions
2026-11-07 15:43:52 +01:00
David Mann eb3b17b765 Merge pull request #10730 from Lcoding15/fix/typing-records-one-step
Actions: typed text records as one step; Batch says which files failed (#10113, #10682)
2026-11-07 12:16:19 +01:00
0eb6ba9dea #10730: keep the filter-preview comment the main merge cut; check both Batch outputs
The merge of main into #10730 dropped the first line of the comment above the
filter-preview check in confirm_generic_command; it is back. The Batch test now
compares out/b.png with the hand-typed reference as well as out/a.png, so a
replay that stops after the first file fails it (review on #10730).

Co-Authored-By: Lcoding15 <Lcoding15@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 01:40:56 +01:00
David Mann 0f286b57a9 Merge pull request #11252 from NaufalDzz/fix-transform-several-selection-rules
fix(transform): refuse the Background among several layers and apply the box on a selection change
2026-11-07 01:12:41 +01:00
David Mann 65cdc3159c Merge remote-tracking branch 'origin/main' into pr-10730 2026-11-07 01:09:59 +01:00
David Mann 6b0f7762e1 Merge pull request #11671 from davidmann4/integration-batch-20
Integration batch 20: 7 i18n PRs (Thai, Hebrew, Urdu, Tamil, Azerbaijani, Romanian, Korean)
2026-11-06 22:49:42 +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
Nikolai Nyegaard f7aea09940 Menus: assert Offset's submenu path in the Color to Alpha test 2026-11-06 18:19:19 +01:00
Nikolai Nyegaard d4240b630d Labels: match Photoshop's menu, tooltip and spelling conventions
Edit > Preferences > General…, Select > Inverse, Filter > Other without the
ellipsis, Layer > Rename Layer… with one, Proof Setup's color-blindness names
with a hyphen, the Layers panel's Quick Export as PNG, the toolbar's Default
Foreground and Background Colors (D) and Switch Foreground and Background
Colors (X), and the remaining British spellings in the English source. Keys
renamed in every catalog; rows dropped where the new key was already translated.
2026-11-06 18:19:19 +01:00
David Mann 7919429708 Merge remote-tracking branch 'origin/main' into feat/crop-task-bar-10890 2026-11-06 17:50:28 +01:00
David MannandClaude Opus 5.5 c7b5373ba8 Crop: Contextual Task Bar under the crop frame, as a reusable task-bar widget (#10890)
The Crop tool gets the reference application's contextual task bar: a small floating
bar centred 11 pt under the crop frame with a grip, the preset dropdown (the options
bar's own, so both stay in sync), Straighten, a ⋯ menu (Hide bar, Reset bar position,
Pin bar position) and, while a crop is pending, Cancel and Done. It follows the frame,
stays inside the canvas, and stays put once dragged or pinned. Window › Contextual Task
Bar (after Tools, as in the reference) shows and hides it.

The bar itself is a reusable widget (widgets/task_bar.rs): position rule, grip, ⋯ menu
and the hide/pin/place state in Panels (kept with the panel layout across restarts,
read by ui.inspect › taskBar, set by ui.set {panels}). A context supplies only its
controls and where ⋯ goes; the Crop contents are tools/crop_task_bar.rs. Generative
Expand stays out until #41.

Also: Lucide pin and rotate-ccw icons, six new strings in all 27 catalogues, parity
661/661 (FLOOR raised), control-protocol docs. Three tests about the options bar's
Ratio dropdown now hide the task bar, which shows the same dropdown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 17:50:20 +01:00
David Mann af99f69602 Merge pull request #7719 from davidmann4/fix/cas-background-selection
Content-Aware Scale works on the Background with a selection (#7717)
2026-11-06 17:28:41 +01:00
David Mann f38a7dfecb Merge remote-tracking branch 'origin/main' into pr-11238
# Conflicts:
#	crates/ui-egui/src/panels/layer_filter_ui.rs
#	docs/control-protocol.md
2026-11-06 16:25:36 +01:00
David Mann 2740c5d58f Merge main into fix-transform-several-selection-rules (main c101cbfb7e) 2026-11-06 16:24:54 +01:00
Taxperia 4019112d1d i18n: fix Turkic UI casing and remove unrelated parity edits 2026-11-06 16:09:08 +03:00
David Mann 1c754c72f5 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/ui-egui/src/tools/crop_mode/tests.rs
2026-11-06 14:04:32 +01:00
David Mann ec5eb1e2d0 Merge commit 'refs/fixprs/main' into HEAD 2026-11-06 10:21:59 +01:00
dotCooCoo 8fe24e4a62 Merge main into feat/equalize-entire-image 2026-11-05 19:13:39 -08:00
David Mann b7b61addcd Merge pull request #9276 from davidmann4/fix/9275-crop-esc-mid-drag
Crop: Esc in full screen cancels a drag on the default frame (#9275)
2026-11-06 03:13:52 +01:00
David MannandClaude Opus 5.5 ea15b297f5 Batch 18 (CodeRabbit): parity floor back to 660; Nudge relabel only after a move; shape box drag ends on a tool switch
- menus/parity.rs: #11503 lowered FLOOR to 658 (two Warp rows went);
  with #11497's two entries the batch has 660 live again.
- #11443: a nudge that changed nothing (zero offset) no longer renames
  the state on top to "Nudge".
- #11295: a handle drag remembers its tool and ends on any tool switch,
  also to another tool that shows the box; the release of a drag that was
  just dropped is consumed instead of reaching the new tool; the box is
  drawn only over the active document's view.

Tests for each (both new UI tests fail without their fix).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 03:07:11 +01:00
dotCooCoo 9ffbca0e5c Merge main into feat/equalize-entire-image 2026-11-05 18:04:02 -08:00
Zinadin ZidanandClaude Opus 5.5 3d60ad01f9 Channels: the panel menu has the channel commands, New Spot Channel among them (#11451) (#11557)
* Channels: the panel menu has the channel commands, New Spot Channel among them (#11451)

The Channels panel's menu had no channel items, so New Spot Channel... and
the rest could only be reached from a row's right-click menu. It now lists
New Channel..., Duplicate Channel, Delete Channel, New Spot Channel...,
Merge Spot Channel, Channel Options..., Split Channels and Merge
Channels..., each acting on the targeted channel and greyed where it can't:
Duplicate takes a single colour, alpha or spot channel, the composite of a
one-channel image, the Quick Mask or a targeted layer mask. Channel
Options... in Quick Mask mode now opens the targeted alpha or spot
channel's options, not Quick Mask Options. The panel menus run their
commands through the menu bar's enabled rules, so the Layers panel menu
greys its dialog items the same way too. The labels are in every catalog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Channels: New Channel... and Merge Channels... ask first, from the panel and row menus (#11451)

The panel menu's Merge Channels... ran channel.merge with no parameters, and
the engine merged the first grayscale documents into RGB and closed them with
no choice; New Channel... added a channel straight away. Both now open a
dialog when called without parameters, as New Spot Channel... and Channel
Options... already did: New Channel... reuses the Channel Options dialog
(name, colour indicates, colour and opacity), and a new Merge Channels
dialog picks the mode and the open grayscale document for each channel. The
channel rows' menu had the same two items and goes through the same path.
With parameters (scripts, the New button) both still run at once.

The Merge Spot Channel test now checks pixels, so a delete couldn't pass it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Channels: Merge Channels waits for three grayscale documents and the dialog offers only modes they fill (#11451)

With two grayscale documents open, Merge Channels... was enabled and its
dialog repeated a document for the third channel; OK then failed in the
engine and the dialog closed. The engine's rule now needs three documents
of one size (no mode merges fewer), so the menus grey the item below that.
The dialog offers only the modes the open documents can fill (RGB and Lab
from three, CMYK from four), greys OK with the reason while the picks
repeat, keeps itself open when OK is refused, and comes back with the
engine's message if the merge itself fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Channels: the Merge Channels dialog keeps its picks by document id (#11451)

The dialog kept the picked source documents by tab index, and background
work can still run while it is open, so a document moved or closed in the
meantime could leave another one at a picked index; OK would then merge,
and close, the wrong document. The picks are now document ids, resolved to
the current tabs when OK is pressed: a closed pick, or one that is no
longer a grayscale document of the same size, is refused with the reason
and the dialog stays open.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 02:20:08 +01:00
David Mann 3af79c0cb7 Merge main 9b02eac2c4 into integration batch 18 2026-11-06 02:14:46 +01:00
Hector VillarrealandClaude Opus 5.5 e4f2069b1b Paths: ⇧⌥⌘↩ intersects the path with the selection (#7726)
Main already has Add Path to Selection (⇧⌘↩) and Subtract Path from
Selection (⌥⌘↩) as engine commands (#8015). This adds the third,
path.intersectWithSelection (Cmd+Alt+Shift+Enter), next to them:
path.toSelection with mode "intersect", loading the path selected in
the Paths panel (or the one being drawn) from the UI as the other two do.

Tests: an engine test that the three fixed-mode commands match
path.toSelection with their mode whatever mode the params ask for, and
a UI test pressing ⇧⌘↩, ⌥⌘↩, ⇧⌥⌘↩ and ⌘↩ through the egui input, with
Photoshop 2025's areas for the same document (7200, 5200, 800, 2000 px).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 19:13:59 -06:00
Zinadin ZidanandClaude Opus 5.5 9b02eac2c4 Export to files: a Custom JPEG quality in Artboards, Layers and Layer Comps to Files (#11481) (#11558)
* Export to files: a Custom JPEG quality in Artboards, Layers and Layer Comps to Files (#11481)

The engine commands already took `quality` (0..12), but their dialogs
offered no way to set it. Each dialog now has a Quality row with a Custom
checkbox, shared with Batch: quality is sent only for JPEG with Custom on,
so an export left alone writes exactly what it wrote before (the source
JPEG's own quality, else the encoder default), and PNG, WebP (still
lossless), PSD, TIFF and BMP never get one. Alt+Reset restores the Custom
state too. The fields follow the reference dialog's order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Tests: the export quality tests go through the dialog's own controls (#11481)

Custom and Quality are now ticked and typed through their widgets, a new
test switches one dialog from JPEG to PNG and WebP and back and checks the
Custom quality survives, and Alt+Reset is clicked through the same path the
app uses instead of calling reset_form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 02:10:18 +01:00
David Mann 09e44e022c Merge PR #11497: Menus: View › Guides submenu in the reference's order, with Edit Selected Guides and Clear Selected Guides (#11400)
# Conflicts:
#	crates/ui-egui/src/lib.rs
#	docs/parity-checklist.md
#	docs/scorecard.md
2026-11-06 00:29:28 +01:00
David Mann a77d7d6b53 Merge PR #11503: Layer > Smart Objects says Reveal in Explorer, Embed Linked and Embed All Linked, in the reference order, without the Warp rows (#11401) 2026-11-06 00:28:25 +01:00
David Mann c581cd57c2 Merge PR #11455: Menus: Combine Shapes, Open Recent, Arrange and Proof Setup items carry the reference's names (#11399) 2026-11-06 00:28:19 +01:00