Swatches: a Cmd/Ctrl+Alt-dropped tint replaces a swatch with the color the drag showed

The replacement now sends the dragged paint's own color, like the new spot
swatch does, so a base that changed during the drag does not change the
result. Ordinary drops still send a tint's link to its base.
This commit is contained in:
dotCooCoo
2026-11-17 10:56:25 -08:00
parent b3cbba36df
commit e76005d537
3 changed files with 29 additions and 8 deletions
+1 -1
View File
@@ -1740,7 +1740,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
Unchecking Show Recent Colors in the Color panel's menu hides its Recent Colors row, and checking it shows the row again ([Select colors using the Color panel](https://helpx.adobe.com/illustrator/desktop/manage-colors/select-and-adjust-colors/select-colors-using-the-color-panel.html)). In VectorCraft the item is checked by default and kept between sessions, applied colors still join the list while the row is hidden, Hide Options hides the row either way, and the Swatches panel keeps its row (`ui.colorPanel {recentColors}`). Tests: `show_recent_colors_hides_and_shows_the_row` in `crates/ui-egui/src/panels/color/tests.rs`.
The Swatches panel's menu has its own Show Recent Colors item: unchecking it hides the panel's Recent Colors row and checking it shows the row again ([Color Enhancements in Illustrator](https://community.adobe.com/announcements-651/color-enhancements-in-illustrator-816797) puts recent colors in the Color and Swatches panels; [Select colors using the Color panel](https://helpx.adobe.com/illustrator/desktop/manage-colors/select-and-adjust-colors/select-colors-using-the-color-panel.html) hides them with Show Recent Colors in the panel menu; a [community thread](https://community.adobe.com/questions-652/swatches-disappear-in-swatches-panel-when-switching-between-documents-in-29-7-1-on-macos-816823) turns it off from the Swatches panel). In VectorCraft it is checked by default, kept between sessions apart from the Color panel's, and applied colors still join the list while the row is hidden (#6617). Tests: `show_recent_colors_hides_and_shows_the_swatches_row` in `crates/ui-egui/src/panels/swatches/tests.rs`.
A Recent Colors chip in the Color or Swatches panel drags into the Swatches panel's list to become a swatch of its color, in its color model, as one undo step ([Select colors using the Color panel](https://helpx.adobe.com/illustrator/desktop/manage-colors/select-and-adjust-colors/select-colors-using-the-color-panel.html)). In VectorCraft a chip dropped on a color group or one of its swatches joins that group, anywhere else in the list it joins the ungrouped swatches at the end, a color that is already a swatch is added again under another name, and dragging a chip does not paint the selected art (`swatch.new`). Tests: `a_recent_color_dragged_onto_the_list_becomes_a_swatch` and `a_recent_color_dragged_from_the_color_panel_becomes_a_swatch` in `crates/ui-egui/src/panels/swatches/tests.rs`.
A color dragged into the Swatches panel with Cmd (macOS) or Ctrl (Windows) held becomes a spot color swatch ([the help page](https://helpx.adobe.com/illustrator/desktop/manage-colors/use-swatches/create-spot-color-swatches.html) gives this drag from the Color panel as one way to make a spot color). VectorCraft's own rules: Ctrl works on Linux too, and the modifier is read on release; the Fill and Stroke squares, Recent Colors chips and Color Guide colors drag the same way; the new swatch is global, keeps the dragged color's model, joins the color group it is dropped on (anywhere else, the ungrouped swatches at the end), takes a name of its own and is one undo step that paints no art; a tint dragged this way becomes a new spot color of the tinted color, and its base swatch stays as it is; with Alt also held, a color dropped on a solid swatch replaces it, and one dropped on Registration or a tint swatch becomes a spot color; gradients, patterns, Registration and swatches dragged within the panel are not made spot colors (`swatch.new {spot: true}`). Tests: `a_color_cmd_dropped_on_the_panel_becomes_a_spot_swatch`, `a_color_cmd_dropped_on_empty_list_space_becomes_a_spot_swatch`, `a_cmd_drop_of_other_paints_or_rows_makes_no_spot_color` and `cmd_drops_of_tints_and_with_alt_follow_the_replacement_rule` in `crates/ui-egui/src/panels/swatches/tests.rs`.
A color dragged into the Swatches panel with Cmd (macOS) or Ctrl (Windows) held becomes a spot color swatch ([the help page](https://helpx.adobe.com/illustrator/desktop/manage-colors/use-swatches/create-spot-color-swatches.html) gives this drag from the Color panel as one way to make a spot color). VectorCraft's own rules: Ctrl works on Linux too, and the modifier is read on release; the Fill and Stroke squares, Recent Colors chips and Color Guide colors drag the same way; the new swatch is global, keeps the dragged color's model, joins the color group it is dropped on (anywhere else, the ungrouped swatches at the end), takes a name of its own and is one undo step that paints no art; a tint dragged this way becomes a new spot color of the tinted color, and its base swatch stays as it is; a drop uses the color the drag showed, also when the tint's base swatch changes before the release; with Alt also held, a color dropped on a solid swatch replaces it, and one dropped on Registration or a tint swatch becomes a spot color; gradients, patterns, Registration and swatches dragged within the panel are not made spot colors (`swatch.new {spot: true}`). Tests: `a_color_cmd_dropped_on_the_panel_becomes_a_spot_swatch`, `a_color_cmd_dropped_on_empty_list_space_becomes_a_spot_swatch`, `a_cmd_drop_of_other_paints_or_rows_makes_no_spot_color`, `cmd_drops_of_tints_and_with_alt_follow_the_replacement_rule`, `a_cmd_dropped_tint_makes_its_spot_from_the_captured_color` and `a_tint_alt_dropped_on_a_swatch_replaces_it_with_the_captured_color` in `crates/ui-egui/src/panels/swatches/tests.rs`.
A Cmd/Ctrl-click on the Color panel's spectrum applies Complement and a Cmd/Ctrl+Shift-click applies Invert to the active Fill or Stroke (`paint.complement`, `paint.invert`); with Alt also held, the click recolors the inactive one, as the reference app's [Default keyboard shortcuts](https://web.archive.org/web/20260726060015/https://helpx.adobe.com/illustrator/using/default-keyboard-shortcuts.html) list them.
The Color panel spectrum grows into the vertical space of a resized panel, with Show Options or Hide Options (#8005); compact auto-fit flyouts and embedded mixers retain their previous height. Regression: panels::color::tests::the_spectrum_grows_with_the_color_panel. Scores and estimates unchanged.
A double-click right of an RGB field switches the Color panel's R, G and B between percent and 0 to 255 ([Default keyboard shortcuts](https://helpx.adobe.com/illustrator/using/default-keyboard-shortcuts.html), Color panel). In VectorCraft the color does not change, Web Safe RGB and the hex field stay in 0 to 255, and the panel keeps the choice between sessions (`ui.colorPanel {rgbPercent}`); the color mixer of the Fill and Stroke chips and the gradient stop dialog follow the same setting. Toggle RGB Percent (`ui.colorRgbPercent`) in the command palette and Keyboard Shortcuts switches the units from the keyboard. Tests: `rgb_percent_switches_the_rgb_fields_between_percent_and_0_to_255`, `rgb_percent_does_not_switch_while_the_rows_are_disabled`, `rgb_percent_comes_back_after_a_restart` and `toggle_rgb_percent_switches_the_units_from_the_keyboard` in `crates/ui-egui/src/panels/color/tests.rs`.