mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-24 09:46:59 -06:00
Swatches: Alt-click on a swatch recolors the selected gradient stop
With a gradient stop selected, an Alt-click on a color swatch painted the inactive Fill or Stroke, as it does with no stop selected. The reference app's Default keyboard shortcuts page lists "Apply swatch color to active (or selected) color stop: Alt-click swatch in the Swatches panel" for the Gradient panel. Now, when the active Fill or Stroke is a linear or radial gradient with a selected stop, an Alt-click on a color swatch or a tint swatch recolors that stop in one undo step, and the stop stays selected. The stop changes as a drop of the same swatch on the Gradient panel's ramp changes it (drop_color and dropped_link in panels/gradient.rs): it becomes fully opaque, and a global or spot color or a tint stays linked, so editing the swatch recolors the stop. With a freeform gradient, the selected point takes the color through paint.freeform.setPoint. With no stop or point selected, Alt-click paints the inactive Fill or Stroke as before. The Fill and Stroke chip popovers show the same swatches and behave the same. Docs: docs/control-protocol.md, docs/target-app-parity.md.
This commit is contained in:
@@ -163,7 +163,9 @@ tool option `stop` (the tool to return to; `tool.setOption {key: "stop", value:
|
||||
samples the colour there into the selected stop (`paint.sampleColor {color, stop}`) and switches back. Dragging a
|
||||
swatch, a Fill/Stroke proxy or the panel's gradient thumbnail onto art runs `paint.setFill` / `paint.setStroke` (the
|
||||
active proxy) with the paint's params and the object's `ids`; a colour dropped on the panel's ramp adds or recolours
|
||||
a stop.
|
||||
a stop. Alt-clicking a color swatch in the Swatches panel recolors the selected stop as a drop on it does
|
||||
(`paint.editGradient {stops}`), or the selected point of a freeform gradient (`paint.freeform.setPoint`); with no stop
|
||||
or point selected, it paints the inactive Fill or Stroke.
|
||||
|
||||
Freeform gradients: double-clicking a point with the Gradient tool opens the same `gradientStop` popover on the selected
|
||||
point (`paint.freeform.selectPoint`); its fields are `color` (hex), `opacity` and `spread` (percentages), applied by
|
||||
|
||||
Reference in New Issue
Block a user