Swatches: Alt-dragging a swatch onto another replaces that swatch's color

In the Swatches panel, a swatch dragged onto another swatch moved next
to it whether or not Alt was held. With Alt held at the release, a
swatch dropped on a swatch of its kind now gives that swatch its color,
gradient or pattern in one undo step, and the swatch keeps its name and
place. Art linked to a global swatch takes the new color. Drags of
None, Registration or color groups, and drops on a tint swatch or on a
swatch of another kind, work as before.

A color dragged in from outside the panel, such as from a Fill/Stroke
proxy, and Alt-dropped on a tint swatch failed with an error that the
swatch is a tint. It now becomes a new swatch, as a drop on a swatch of
another kind does.

Docs: docs/control-protocol.md, docs/target-app-parity.md.
This commit is contained in:
dotCooCoo
2026-10-16 14:58:08 +07:00
committed by bflatastic
parent bb66070841
commit 9336111655
3 changed files with 96 additions and 16 deletions
+4 -1
View File
@@ -127,7 +127,10 @@ Swatch editors: `engine.execute` with `ui.swatchOptions {name}` opens the `swatc
`preview`), which previews on the canvas while open; `ui.dialog.confirm` applies it with `swatch.edit` as one undo
step and `ui.dialog.cancel` rolls the preview back. For a gradient swatch the dialog has `name` only (it shows the
gradient) and OK renames it; pattern swatches open pattern editing instead. Dropping a gradient (or colour) on a
swatch of its kind in the Swatches panel with Alt held replaces it (`swatch.edit {name, paint}`).
swatch of its kind in the Swatches panel with Alt held replaces it (`swatch.edit {name, paint}`), unless that is a
tint swatch. A swatch dragged from the panel with Alt held also replaces the swatch of its kind it is dropped on,
which keeps its name and place (`swatch.edit {name, paint: {swatch}}`); without Alt, or on a tint swatch or a swatch
of another kind, it moves.
Confirmations: deleting swatches from the Swatches panel opens a `confirm` dialog (fields `message`, `detail`);
`ui.dialog.confirm` runs the command it asks about (here `swatch.delete`) and `ui.dialog.cancel` drops it.