server.rs takes main's ui_set layerFilter description (#5776), which
replaces the earlier stopgap here.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
server.rs takes main's ui_set layerFilter description (#5776), which
replaces the earlier stopgap here. es.tsv: main's Spanish catalog (#4306)
now has New Layer…, Panel Options… and Lock Layers, so this PR's copies
of those rows are dropped (bundled_catalogs_are_consistent).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
brush.presets.importAbr named each imported preset with unique, which
compared a candidate name with the names of the presets one by one and
tried "Name", "Name 2", "Name 3" and so on until one was free. A
version 1 or 2 brush with a computed tip and no name is named after
its tip ("9 px Round"), so a file of n such brushes of one diameter
cost about n^3/6 string comparisons. In a test build, importing 10,000
of them took 25 minutes (22 minutes of CPU time).
The import now builds the set of preset names once and keeps the next
number to try for each repeated name, as swatches.import does for
swatch and group names. Names still compare case-insensitively, and
every preset gets the same name as before. brush.presets.importImage
names its one preset with the same code.
repeated_brush_names_are_numbered_in_linear_time imports 10,000 such
brushes on a thread of its own and fails when the import takes more
than 20 seconds. repeated_brush_names_take_the_first_free_number
checks the names when the file repeats a name in other letter cases,
when a preset already holds one of the numbers, when the file has a
name that the import already gave to an earlier brush, and when a
name clashes with a built-in preset.
The fixture builds "Sheets" with layer.groupLayers, which now creates the
group collapsed. The unfiltered baseline lists only expanded groups'
contents (Photoshop), so open the group as the other group tests do. The
filtered checks already look inside collapsed groups (display_rows gets
show_all while a filter is active).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Type tool's options bar now has Photoshop's Create warped text button
after the text colour swatch. It opens the same Warp Text dialog as
Type > Warp Text... for the selected type layers (or the layer being
edited), and is greyed when there is no type layer to warp.
- assets/icons/text-warp.svg: original glyph (a T above a bowed arc) on
Lucide's 24 px grid and stroke; listed in ATTRIBUTION.md.
- The tooltip is translated in all 20 catalogs, reusing each language's
existing "Create Warped Text" wording (new for Russian).
Test: options_bar_warp_button_warps_the_selected_type_layers.
Co-Authored-By: Claude
* Type: keep text selection highlight visible while Command/Ctrl is held
* Type: match Photoshop 1px dark frame and handle styling for type transform
* Merge main; keep the transform box and underline colours from the theme tokens
The selection-highlight fix stands on its own; the hard-coded box and
underline colours and the removed reference point were unrelated to it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: safvanedge <241307593+safvanedge@users.noreply.github.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Dragging selected anchors with the Direct Selection tool ignored Shift,
so lengthening a slanted bar also nudged it vertically. As in Photoshop,
Shift now locks the anchor move to multiples of 45° from the press, in
the live preview and in the committed path.moveAnchors. It works whether
Shift is held from the press or added during the drag; Shift at the
press still toggles the anchor's selection as before.
Reuses stroke_constraint::snap45 (the Gradient tool's Shift lock).
Fixes#5475
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Brandon Thomas <echelon@gmail.com>
The overlay that keeps the title strip's free gap draggable under a dialog's
modal layer (#4913) only ran with the custom title bar. macOS keeps the OS
traffic lights over the app's own title strip (custom_titlebar is false), so
with the Embedded Profile Mismatch prompt or any dialog open the window could
not be moved. The overlay now runs whenever the strip is drawn.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The main window set a runtime PNG icon everywhere. On macOS that replaces the
app bundle's PhotoCraft.icns in the Dock, so the system couldn't render it
in its own style (Liquid Glass and its tinted and dark variants). The runtime
icon is now skipped when running from an .app bundle; unbundled runs and the
Windows and Linux builds still set it.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
German showed "Ja (Y)" next to "(N)ein". Keys now go inside the words only when
every translated label starts with its key; otherwise all labels append it
("Ja (Y)", "Nein (N)", "Abbrechen (C)").
Co-authored-by: Cursor <cursoragent@cursor.com>
Dragging a Curves point (or any control) in the Properties panel of an
adjustment layer previews through `canvas::ensure_proxy_preview`, which
picked its downscale factor from the document size alone
(`proxy::preview_factor`): any document over 5 MP was drawn from a 2-5x
reduced copy at every zoom, so at 100 % the canvas turned blocky until
the mouse was released.
Cap the factor by the view's zoom with the rule the Image > Adjustments
dialogs already use (`adjust_preview::proxy_factor`: the proxy stays at
least at screen resolution) when the wgpu compositor can draw the
full-size document. At 50 % and closer the drag now shows the full-size
composite; zoomed out, the proxy still saves the work. Documents the GPU
compositor doesn't cover keep the old proxy (the full size would be a
CPU composite per change).
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
As in Photoshop, dragging a guide out of the top ruler with Alt/Option held
makes a vertical guide, and out of the left ruler a horizontal one; without
Alt each ruler makes its own kind, as before.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The Studio, Adwaita and Breeze themes' Move tool options bar had only Auto-Select and a hint, so Show Transform Controls could not be turned on there and a click on a layer never showed its box and handles. The toggle is now in every theme, as Auto-Select is (#1275).
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Files dropped from another app's window (a file manager) were imported, but
the source window stayed in front of PhotoCraft. The frame that takes a drop
now asks for focus, so PhotoCraft comes forward as Photoshop does.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
The canvas cursor match mapped Tool::Move to CursorIcon::Move, the 4-way
move cursor, while Photoshop shows its standard arrow pointer and marks the
movable layer with the hover outline. Use CursorIcon::Default for the tool
(#5646).
* UI: centre text vertically in shared text fields
TextEdit draws its line at the top of its rect, and the theme's 24 pt
interact height made the edit taller than the field's inside, so text in
widgets::text_field sat a few pixels high (Preferences search, hex fields,
name fields) while dropdowns and value fields were centred. Fill the box
and centre the line in it.
* Fixed failing test
---------
Co-authored-by: Stevan Marjanović <24486184+stevanmarjanovic@users.noreply.github.com>
Three prompts used the formal verb form ("Adjon", "Válasszon",
"kattintson"); the catalog addresses the user informally throughout.
Two colour profile messages put an article before a placeholder
("A(z) „{name}”") and glued a suffix to one ("{mode}-profilja"). The
correct form depends on the inserted value, so the placeholders now
stand after a colon or in brackets.
The Ask On Mismatch hint kept the English option name; it now names
the Hungarian label of that option in Color Settings.
Saving an Indexed Color document as BMP went through the ordinary RGB
path and wrote a 24-bit file, so the colour table was lost on reopen
(the PNG exporter already had a palette branch).
export_mode_specific now sends Indexed Color to BMP as well as PNG,
through a new encode_bmp_indexed that writes an 8-bit palette BMP with
the document's table. BMP has no transparency, so a transparent index
is written as its palette colour and the export says so.
bmp_palette returned the decoder's 256-entry padding, so a 3-colour BMP
reopened with 253 extra black entries. It now trims the table to the
colours the header declares.
A shape layer's path is its vector mask in Photoshop (Properties > Masks),
with its own vector-mask density and feather. PhotoCraft's ShapeLayer had
neither, so soft shapes could not be made, and stroked soft shapes from PSDs
lost both on import.
- doc: ShapeLayer gains `density` (0..1, default 1) and `feather` (px,
default 0).
- vector: the shape renderer applies them to the fill as a soft vector mask
(fill shows beyond the path at 1 - density; the feather is the vector
mask's Gaussian), so the shape's own pixels, the GPU (which samples them)
and the stroke/fill split all follow. The stroke stays crisp. The feather
blur moves from compose::masks to vector::feather and both share it and the
feathered area, so a shape and an equal vector mask render the same pixels.
- compose: soft shapes' bounds reach their fill, their layer effects follow
the soft alpha, and the split cache key includes density and feather.
- engine: `layer.vectorMask.edit` on a shape layer sets density/feather in one
history step (path/enabled/linked/invert are refused there); density is now
validated (finite 0..100) instead of clamped. `layer.vectorMask.info`
reports a shape's values.
- ui: Properties shows the Vector Mask Density and Feather sliders for a
selected shape layer in both themes (live drag, one undo per gesture).
- .pcraft: manifest and convert carry both with serde defaults (older files
load at 100 % and 0 px).
- PSD: export writes them as the vector density/feather mask parameters;
import reads them into the shape (re-rendered, as the stored pixels lack the
fill beyond the path). Soft unstroked solid/gradient shapes now import as
shapes instead of fill layers with a vector mask; pattern-filled ones stay
fill layers.
Photoshop's 10 px feather on a 100 px black square, row 100, x = 30..72:
ours is within 1 level of every measured value (8, 16 and 32 bits);
density 50 % shows 127/128 beyond the path and 0 inside.
Scorecard: TOOL-214-12 done.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
With Transparency Shapes Layer off, Photoshop composites a pixel of alpha a at Fill f in Color
Burn/Dodge, Linear Burn/Dodge, Vivid/Linear Light, Hard Mix and Difference as an opaque pixel at
Fill a x f: the alpha pulls the source toward the mode's neutral colour inside the blend, and
only Opacity x masks cover the backdrop. Masks keep acting as coverage, and the other modes look
the same either way. Measured in Photoshop on generated documents (12 modes, Opacity 100/53,
Fill 100/50, alpha 10-100 %, a 10-100 % mask, a half-transparent backdrop and an isolated group):
the model is within 2 levels everywhere (Hard Mix near full alpha within 4, from 8-bit rounding).
The CPU compositor folds the content alpha (masks divided out) into Fill for such layers; the
GPU compositor has no pass for it, so advanced_active sends those documents to the CPU.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Main's History panel can select a snapshot, and its trash then deletes that
snapshot (#5324). The panel menu's Delete still deleted the current state.
It now follows the same selection.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Main has the marquee Shift+Alt intersect test (#3624), so the row no longer
says it is missing.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Layers picked with the Move tool (a click, Shift-click or its marquee) now
take a colour picked in the Color or Swatches panel or the Color Picker:
every selected type layer's colour and every selected shape's fill, in one
history step. The brushes, the pixel selection tools and the other tools
still change only the foreground.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gradient layer effects baked only their colour stops; the opacity stops came
through raw, so Smoothness, opacity midpoints and the interpolation method
never reached the transparency ramp. Gradient fill layers applied Smoothness
and midpoints but always with Classic.
Both now share one bake (gradient_bake::bake_opacity). Measured on scripted
Photoshop 25.1 (overlays and fill layers render identical pixels): Linear and
Perceptual also bend the opacity curve (stops enter the method's space as
sRGB grey levels, the result leaves as y^0.65), fitted within 0.015 of every
8-bit sample. Smooth keeps Classic's opacity curve (not measurable on 25.1).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The merge of main (5a4df1a3) committed unresolved conflict markers in the
status lines of gaps.md, target-app-parity.md and ui-parity.md and in the
Type/Vector rows of target-app-parity.md. Keep main's text and add this
PR's own items back: G8 Warp Text preview done (TYPE-218-7), the Type
row's evidence, and the selection-modifier and Alt-wheel rows.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
dropdown_with keeps all three: combo_list (#5495), main's translate flag for
dropdown_literal (#5335) and the starts_group separators (#5532).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>