A solid color dragged into the Swatches panel from the Fill and Stroke
squares, a Recent Colors chip or the Color Guide, and released with Cmd
(macOS) or Ctrl (Windows, Linux) held, becomes a global spot color
swatch (swatch.new {spot: true}) in the dragged color's model. It joins
the color group it is dropped on, takes a name of its own and is one
undo step. A tint becomes a new spot color of the tinted color. With
Alt also held, Alt's replacement of a solid swatch applies first.
Gradients, patterns, Registration and swatches dragged within the panel
are unchanged.
Delete Swatch took dragged rows through the name-prefix filter of the
selection's click path, so a user swatch such as [Blue] dropped on the
button was ignored. The drop now keeps color groups and every swatch of
the document other than None and Registration, as swatch.delete does.
A swatch dragged from the Swatches panel, in any view, and released on
the New Swatch button is copied through swatch.duplicate without
opening the New Swatch dialog. A swatch that is part of the selection
carries the other selected swatches with it, and the copies of one drop
are one undo step. Each copy goes just after its swatch and in its color
group, takes the usual "copy" name, and is selected. Modifiers held on
release do not change the drop. Color groups, None and Registration are
not duplicated; a user swatch whose name starts with a bracket is. The
button is outlined only while such a swatch of the active document is
held over it, so a paint from another panel, art, a swatch dragged from
another document and a swatch deleted during the drag duplicate nothing.
A click on the button still opens New Swatch.
A swatch or color group dragged from the Swatches panel, in any view,
and released on the Delete Swatch button is deleted through
swatch.delete, even while nothing is selected and the button is
disabled for clicks. A swatch that is part of the selection carries the
other selected swatches of its kind with it. The drop asks first as a
plain click does, and Alt does not skip the question; Cancel keeps
everything, and OK deletes them in one undo step. None and Registration
are never taken. The button is enabled while swatches are selected or
while a swatch or group of the active document is being dragged, and it
is outlined only while such a swatch or group is held over it. A paint
from another panel, art, and a swatch dragged from another document
delete nothing.
The list's drop zone now ends where the list does. It used the list's
height before the list shrank to its rows, so with few rows it reached
over the buttons below and took a release on them: a paint dropped on
Delete Swatch became a new swatch.
main's gate fails french_catalog_uses_nonbreaking_prose_punctuation on
the "{pos} of {total}: {name}" row of fr.tsv, added by #8017, which has a
plain space before the colon. The row now uses U+00A0 there.
Open #8053 fixes three other rows that main already has right, so it
does not clear this failure.
The Contextual Task Bar and the Control bar check, each time they are
drawn, whether the selection holds a color that Recolor Artwork can
change. The check walked the whole subtree of each selected object even
after the first color, so with one large group selected, the check read
every paint in the group.
- Node::try_walk visits in walk's order and ends at a ControlFlow::Break.
- swatches::node_has_colors stops at the first color node_colors would
visit; node_colors now runs the same visitor without stopping, so the
two read the same nodes and paints in the same order.
- has_colors in the task bar uses node_has_colors.
The result is the same for every selection. On one group of 100,000
paths, the check takes 16 ns instead of 14.5 ms when the first path is
filled; when only the last path is filled, or none is, it costs about
what the full walk costs.