A CSS gradient for the chip, when the thing being edited is filled with a gradient swatch rather than a colour. Held here rather than written onto chip.style from outside, because apply_chip() now runs on every tint change and would paint over anything it does not know about — a gradient page fill would flip to the checkerboard the moment the tint moved.
Whether the tint input, its arrow and its slider accept input. False for a gradient.
Enable or disable the tint input, its arrow and its slider together.
Done here rather than through Inputfield.setactive(), which repaints the border that init() deliberately strips to make the control read as one box, and which does not stop the arrow opening the slider popup — a disabled field with a working slider beside it would be worse than no disabling at all.
Picking a colour replaces any gradient, which is what choosing a solid swatch means.
Show a gradient instead of a colour. Pass null to go back to the colour.
A gradient has no tint — it carries its own stops — so the tint control is disabled along with it rather than left accepting a number that changes nothing.
Repaints: the chip shows the colour AT its tint, so the two cannot drift apart.
Staticfor_The control owning chip, or null if that element is not one of ours.
SwatchPanel is handed a chip's element id and applies a pick by writing to it. Going through the control instead keeps its state honest: a solid swatch has to re-enable the tint that a gradient disabled, and the chip has to be painted at its tint rather than flat.
panelmust be given when this control lives inside a dialog.With no panel, Inputfiel_slider_control treats itself as parameter-bar furniture: opening the tint slider shows #wrapper and HIDES #dialoglayer, and closing it hides #wrapper. Both are right for the parameter bar and destroy a dialog — the dialog vanishes on the first click of the tint arrow, and is left orphaned in a hidden layer.
Any element identifying the owning panel will do; it is only ever null-checked.