mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-19 12:38:18 +00:00
Merge pull request #8456 from dotCooCoo/feat/swatches-color-group-options
Swatches: Color Group Options renames the selected color group
This commit is contained in:
@@ -150,7 +150,11 @@ those rows with `layer.delete` in the document the question was asked in. `layer
|
||||
New swatches and colour groups: `ui.newSwatch {spot?, global?, group?}` opens the `newSwatch` dialog prefilled from the active
|
||||
fill or stroke (fields as in `swatchOptions` plus `group`; a gradient or pattern only takes `name`) and
|
||||
`ui.newColorGroup {swatches?}` opens `newColorGroup` (fields `name`, `fromArtwork`, `toGlobal`, `includeTints`,
|
||||
`swatches`); `ui.dialog.confirm` runs `swatch.new` / `swatch.newGroup`.
|
||||
`swatches`); `ui.dialog.confirm` runs `swatch.new` / `swatch.newGroup`. `ui.colorGroupOptions {group?}` opens
|
||||
`colorGroupOptions` (fields `name`, `__group`, `__swatches`, `__index` and `__doc`) for `group`, or without it for the
|
||||
color group selected alone in the Swatches panel; its `ui.dialog.confirm` runs `swatch.renameGroup`. A refused name keeps
|
||||
the dialog open; when another document is active, or the color group at the group's place in the list no longer has the
|
||||
name and swatches it opened with, the confirm closes the dialog and renames nothing.
|
||||
|
||||
The Color Picker is a dialog too: `engine.execute {command: "ui.colorPicker", params: {stroke?, color?}}` opens it for the fill (or stroke) proxy; `ui.dialog.set {field: "hex", value: "00FF00"}` (or `color`, `channel`, `webOnly`, `swatches`) then `ui.dialog.confirm` applies the colour through `paint.setFill` / `paint.setStroke`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user