Skip to main content

Module paint

Module paint 

Source
Expand description

The shapes the components share: focus ring, tick, cross, chevron, magnifier, spinner and catalogued icons. Marks are drawn as paths, never as font glyphs, so they look the same with any font.

Functions§

chevron
A chevron of half-width r at center: pointing down at turn 0, up at turn 1 (the dropdown’s chevron rotates as it opens); right points it right.
cross
A close cross of half-size r at center.
dash
The indeterminate dash.
disclosure
A chevron pointing right (collapsed) that turns down as open goes to 1.
focus_ring
The 2 px accent focus ring OUTSIDE rect’s border.
galley
A text galley on one line, in the colour given when it is painted.
icon
The catalogued artwork for glyph in the square rect: monochrome artwork takes color, colour artwork keeps its own. Returns whether there was any.
key_chip
A key chip (Ctrl+S) at min; returns its rect.
lerp_color
a to b by t, per channel, alpha included.
magnifier
The search field’s magnifier.
spinner
The busy spinner: three quarters of a ring that turns, or stands still under reduce-motion. Asks for the next frame while it turns.
tick
A check mark filling rect (a square).