VectorCraft's UI moves onto the shared craft UI framework in storytold/craft-libs (`next`; the framework side is storytold/craft-libs#2809), as PhotoCraft's did. The app keeps its engine, document model, file formats, commands and automation; its windows, panels, bars, dialogs and canvas are now built and driven by the framework: shell, docking and panels, hosted dialogs, keyboard, focus, IME and pointer routing, and theme tokens.
About 264,000 lines of VectorCraft's own egui UI code are removed and about 154,000 added. craft-libs is pinned at bf62d509f (in `next`), the egui fork at f5025284.
Tests that drove the old UI were rewritten against the port where only their premise changed, with their assertions kept. The UI tests still failing at merge, and their follow-ups, are listed in the pull request.
While the Live Paint Bucket is active, a paint or stroke command that names
no objects changes only the colors the bucket paints with. The journal
recorded the params as given, and the active tool is not journaled, so a
replay with the Selection tool active painted the selection instead.
The paint and stroke commands now take defaultsOnly: true, which keeps a
command without ids, id or item to the defaults with any tool active. When
the bucket routed a command, its journal entry notes defaultsOnly: true,
also when the params gave false. library.use (a color, gradient or pattern)
and swatch.library.add with apply note it too and pass it to the commands
they run.
- defaultsOnly is a bool. It is refused with ids, id or item, and in
stroke.setAdvanced with brush.
- With New Art Has Basic Appearance off, new-art inheritance does not
replace the defaults after such a command, unless a later step of a batch
selects another first object or changes its appearance.
- A preview with defaultsOnly: true, and the one after it, starts from the
defaults the interaction began with, and a cancel puts them back.
- paint.sampleColor with a stop and defaultsOnly reads the default's
gradient.
Test: live_paint_bucket_commands_replay_from_the_journal_with_another_tool
(engine). Docs: docs/mcp.md, the Live Paint Bucket paragraph; params text
of each command.
Keep consumed releases separate from fresh canvas presses, use click release positions, share the engine trace target selector, reject source misses before sampling, and return from the temporary tool without fresh activation.
With a Live Paint group selected and the Live Paint Bucket active,
choosing a fill color (a swatch, the Color Picker, the Fill box) painted
the whole selection, so every face and edge of the group took one color
before the bucket painted anything.
While the bucket is the active tool and no ids, id or item are given:
- paint.setFill, paint.setStroke, paint.none, paint.lastColor,
paint.lastGradient, paint.editGradient, paint.invert,
paint.complement, paint.swap and paint.default change only the
defaults, the colors the bucket paints with, and record no undo step;
- stroke.set, stroke.weightUp, stroke.weightDown and stroke.setAdvanced
(without a brush) change only the stroke for new art;
- the Fill and Stroke proxies, the Stroke panel and its Profile list
follow those defaults, as they do with nothing selected;
- New Art Has Basic Appearance off no longer copies the selection's
appearance into them after a command;
- canceling a Color Picker preview puts the bucket's color back.
Window › Retype shows a panel that lists the fonts whose glyphs the
selected outlined text exactly matches. Find Matching Fonts lists ten,
ranked by how many shapes each matches and then by how closely, and
Find more font matches adds the next five from the same search. Each
row shows a sample in the font, at the size the panel menu sets (Small,
Medium, Large) and with the text typed in the panel. A click on a row
sets the font on the selected live type. Reset Retype Panel clears the
list.
- type.retypeFonts {count?} returns the ranked fonts without changing
the document. It compares shapes with the glyphs of up to 96 loaded
fonts, those of the document's live type first, by type.retype's
matching. A shape counts once for each font it fits. Of two loaded
versions of a font, only the version its name gives is compared.
- RetypeIndex::all_matches returns every fit of a shape, so fonts past
the first 16 fits are ranked too.
- retype.find, retype.list, retype.preview and retype.reset drive the
panel.
- Rows for the panel's labels and the commands' errors in every
complete catalog. The Retype row also translates the Type › Retype
menu item.
Docs: docs/mcp.md (Retype panel), docs/target-app-parity.md,
docs/ui-parity.md, docs/gaps.md, docs/type-parity.md.
Part of #4934. Builds on #8441.