Conflicts with main's batch #9880:
- psd file.rs / layer.rs: #5287 (PSB by encoded size, RLE tables widened on
promotion) against #6583's lazy reader. Main's new widening and length code
read `.data`, which #6583 leaves empty while the bytes stay in the source;
it now goes through `encoded()` / `encoded_len()` (also the auto-merged
lines in `rle_widening`, `encoded_len` and `LayerRecord::write`), and the
lazy reader sets `write_as_psb: false`. New test
`a_lazy_psd_promotes_to_the_same_psb_as_an_eager_one`: a lazily read PSD
writes the same PSB bytes as an eager one; it fails with a `.data` read.
- direct_select.rs / vector_ui.rs: #9321's Type Path and #6353's hidden
Work Path both kept.
- io tests main.rs: both modules. scorecard.md regenerated (12 of 181);
ui-parity.md and gaps.md follow it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
CodeRabbit on #9775: FontLibrary::finish wrote a failed type.font.favorite to the status bar as plain information; it now sets status_error like the other status writes. The regenerated scorecard counts 12 of 179 preferences that do nothing; ui-parity.md and gaps.md still said 178.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
CodeRabbit on #9775: newVideoLayerFromFile placed the layer while its content was still empty, so an active artboard always took it and clipped footage centred elsewhere; the first frame is now the content before placement, as in frames_to_layers (footage_off_the_active_artboard_stays_out_of_it fails without it). The merge also left a second check_group_depth ("Duplicate Layers") before main's "Copy Layers" one in layer.copyToDocument, so main's message could never show; it is removed.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
CodeRabbit on #9775: paint.stroke with fill:true builds the coverage, its feathered copy, the selection read and the mask over the region, up to the whole canvas (file.new allows 300000 x 300000), with infallible allocations that abort the process when memory runs out. The peak is now reserved through the fallible allocator first, and the selection is read through it; fill_survives_allocation_failure fails without this (the error came from a later blend).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Main's #9849 lets dropdowns grow back after a short list, and its test
`clearing_a_query_that_matches_nothing_grows_the_menu_back` expects a
search with no matches to shrink the font menu. #6526's menu stayed at its
full 534 px: its font list never shrank (auto_shrink y off), and the
vertical separator between the class list and the font list took the row's
whole available height. The list now shrinks, and the line is drawn over
the laid-out row instead, so the menu ends with the class list.
The test now checks that the menu ends with the class list (it can't drop
below half with the class list beside the list), and a new test pins that
the wheel past the end of the list, or over the class list, never moves
the header, also in a window too short for the full menu.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Main's #9849 bans egui::ComboBox; the preset menu #3558 added now uses
craft_ui::ComboBox, three characters past rustfmt's 160-column limit.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
merged_planes scanned each composite band twice on the calling thread
for alpha, encoded every range into per-channel Vecs one push at a time,
then copied them into the planes. The workers now write their slice of
every plane directly, check alpha as they go, and run a loop
monomorphised per sample type. The 8-bit deinterleave of layer pixels
used one thread per channel with a strided iterator; it now splits the
pixels into one band per core and writes each plane's slice in place.
Same arithmetic, same bytes; a test pins merged_planes against the
previous per-band implementation for RGB, Gray, Lab and CMYK at 8, 16
and 32 bits, with and without the matte.
bench_export .psd, 36 MP, 3 layers, 16 interleaved rounds of 7 reps
(median of medians / min), Ryzen 16 threads, Linux:
709.4 / 413.7 ms -> 540.8 / 318.9 ms (-24 % / -23 %)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A ZIP save encoded the thumbnail and the 1024 px composite preview as PNG
on the calling thread before any tile was compressed. The composite alone
is a ~200 ms single-threaded deflate on a 36 MP document, about 40 % of a
full save. The previews are now encoded on their own threads while the
document is collected and its new objects are compressed on all cores;
the bundle is assembled afterwards in the same order, so the bytes are
unchanged. Directory saves encode them up front as before. wasm stays
sequential.
bench_export, 36 MP, 3 layers, 16 interleaved rounds of 7 reps (median
of medians / min), Ryzen 16 threads, Linux:
.pcraft 517.9 / 471.1 ms -> 319.3 / 287.8 ms (-38 %)
.pcraft with cache 360.1 / 334.1 ms -> 277.5 / 268.3 ms (-23 %)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A new layer with an open group active went above the group whenever the
group had any lock (all, pixels, transparency or position). The
reference application puts it inside, on top of the group's layers, even
when the group is locked with Lock All. Locks no longer keep New Layer,
New Group, adjustment and fill layers out. Layers that are edited right
after they are made (Type, Shape, Place's transform box, Paste, the
Gradient tool's live gradient, video layers, Render, Vanishing Point, a
new frame) take Place::AutoEditable and keep the PR's rule: they go
above a locked group, as before.
Stamp Visible with an open group active put the stamp inside the group,
where the group's opacity, mode or mask applied to the composite a
second time. The reference application puts it directly above the
group; with a layer inside the group active it still lands above that
layer, inside the group.
Co-authored-by: SckraT <70698629+SckraT@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#9321's Direct Selection change calls crate::vector_ui::active_type_path, which
main's layout refactor (#9758) made a private path_ops item, so ui-egui did not
build after the batch's main merge.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* refactor(ui): build every dropdown on craft_ui::ComboBox
Repin craft-libs to the revision with craft_ui::ComboBox, whose menu grows back
after its contents shrink while it is open (egui#5225), and ban egui::ComboBox
in clippy.toml.
* fix(type): the font menu grows back after a search
The search field is the ComboBox header and only the family list scrolls, so
the menu follows the list's height: no unfiltered height kept while searching.
* chore(deps): craft-libs 60d60d48 (dropdown fixes)
* chore(deps): craft-libs 6af63481 (dropdown fixes)
* chore(deps): craft-libs 4d7b82f7 (dropdown fixes)
* chore(deps): craft-libs 92d392cf (#387 merged)
Ports the size, leading and tracking preset chevrons onto main's split type
tool (tools/type_tool/panel.rs, next to num_field, which now names its scrub
icon) and fixes what review found:
- The lists differ from the reference app: Size is 6, 8, 9, 10, 11, 12, 14, 16,
18, 24, 30, 36, 48, 60, 72, 150, 300 pt (the PR had 96, no 16/150/300);
Leading is Auto plus the same list (one shared pub(crate) const); Tracking is
-100..-5 | 0 | 5..200 with separators (the PR lacked -5/5 and separators).
- The PR's layout test was red on CI: the chevron ended ~20 px short of the
column. The numeric field now gets the column width minus the chevron's
exact button width, and the test is strict again (the chevron ends at the
panel edge within 0.5 px, the field's suffix slot matches Transform's).
- In mm the labels read "2.1166668 mm" and a pick stored 12.000001 pt. Labels
now have at most two decimals, a picked preset stores its point value
directly, and "selected" uses a relative tolerance.
- The chevrons have accessible names (Font size / Leading / Tracking presets,
translated in every complete catalog); tests find them by name.
New tests: the literal lists (fail on the PR's lists), the strict layout test,
mm labels and exact 12 pt, a preset while editing a span, and presets without
a type layer setting the defaults with no history step.
Co-authored-by: Ni-zav <106657905+Ni-zav@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main moved the engine commands into crates/engine/src/cmd/ and the
dialogs and panels into submodules. The PR's placement calls follow
them, and main's new insert sites (new_adjustment in adjust_params.rs,
Place in file_cmds/open.rs, shapes in vector_cmds/shape.rs) use
layer_place::insert_new like the PR's originals. The New Group dialog
moves to dialogs/new_group_ui.rs; the Layers panel flyout's New Group…
opens it.
Main's Session::precheck now also checks layer.new.group's and
layer.new.groupFromLayers' new params (name, color, mode, opacity,
position), so precheck_agrees_with_execute holds. Main had since added
"New Group…" to every catalog: the PR's duplicate rows are dropped.
Main's newer tests that made a layer with an open group active now
open the group last, as the PR did for the older ones.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cmd armed the new Distort and Skew pointers in every transform mode, while the
drag did something else: in Rotate mode a Cmd-drag on a corner or edge rotates
but showed the dart or skew arrows; a Skew-mode corner with Cmd showed the dart
but slides along an edge; Distort mode with Cmd drew skew arrows on edges it
refuses. Cmd also hid the curved rotate arrow just outside a corner (the Alias
commit pointer showed) although a Cmd-drag there still rotates.
One helper, handle_indicator, now answers "what does this drag do" with the
same rules as the drag (drag_mods, mode_mods, apply_mode_drag), and both the
cursor and the drawn pointer use it. The pointer is drawn from the canvas's
cursor branch, so a guide, pan or zoom cursor over a handle no longer gets a
second pointer on top, and cursor() no longer hides the pointer while the box
is being applied (the overlay draws nothing then). During a drag the rotate
arrow shows only while the drag rotates (also a Rotate-mode handle drag), not
when a scaling corner strays past another corner. The warp split guide reads
sticky keys like the cursor does.
Co-authored-by: Catur Sura <8650781+catursurapam@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Character section: a style picked under a family's ">" with type layers
selected set the layers but not the style for new type (the options bar
did both). Pick "Inter > Thin" in Properties > Character: new type stayed
Regular.
- Faux bold: a pointed tip moved r/sin(half its angle) along its bisector,
uncapped (3.9 r at 30 degrees, an A apex grew a spike), and tips sharper
than about 20 degrees did not move at all. Every tip now moves at most
2r, continuously; inner corners (the crotch of a V) keep their exact
miter.
- Faux bold: each point searched past runs of coincident points for its
neighbours, O(n^2); a contour of 50 000 copies of one point took ~8 s per
glyph. Neighbours now come from one O(n) pass over the runs.
- prefs.reset {"path":"type"} and Preferences > Type > Reset Section wiped
the favourite fonts; they are kept now (type.favoriteFonts by name, or
Reset All, still clear them).
- An expanded family whose own row scrolled out of view lost its style
rows, so the list below jumped up.
- Show Similar Fonts re-sorted around each font an arrow step applied, so
Down went back and forth between two fonts; the list now compares with
the font current when the filter was turned on (or the menu opened).
- Docs: an uninstalled favourite is kept but not listed; FAUX_BOLD_RADIUS
and the raster budget describe the thickened outline; the unused
"Recent font list" rows are gone; docs/scorecard.md regenerated (the
favourite fonts are one more setting).
Co-authored-by: D-monized <341904702+D-monized@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The dialog remembered the last Width/Height: make a 1080x1350 board from one
layer, then open it for a 20x30 layer and press OK, and that layer got a
1080x1350 board too. It also opened at 0 and an empty Name. It now starts at
the selected layers' size and the next "Artboard N" every time, as in the
reference application. `{"height": -0.4}` rounded to 0 and kept the bounds;
negative sizes are now refused before rounding.
Co-authored-by: DuBearte <130190089+DuBearte@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>