Skip to main content

Module builtin

Module builtin 

Expand description

The painter sets the toolkit ships: Default, Glass and Block (docs/architecture/theming.md, “Part painters”). They implement the same PartPainter a theme’s own set does and draw through the same host; a theme document names them as it would any other set.

  • Default is the design language’s look: opaque grounds and faces, or, given a blur or a tint, a body that shows the blurred backdrop under its ground at that tint, and a rest control face that lets the window ground through at it.
  • Glass is Default with light on it: the backdrop bent at the rim (refraction), a sheen across the upper body (specular) and a lit rim (edge_highlight).
  • Block is flat colour, square to the border: no translucency, no light, no hairline of its own.
  • Liquid is a lens: what lies below bent along the rounded edge as a convex lens bends it (refraction across a band), straight in the flat middle, optionally softened (blur) and fringed (dispersion), with a thin specular rim lit from light_angle (edge_highlight).

Each draws the four surface parts (window ground, floating panel, bar body and control face) and leaves the rest to the toolkit.

Constants§

BAND_ADMITTED
The Liquid set’s band: how far in from the rim the bend reaches, logical pixels.
BAND_USABLE
The band a theme is built at: past 48 a bar or a button is all rim.
BLOCK
The name a document gives the Block set.
BLUR_ADMITTED
Blur band a document may state, logical pixels.
BLUR_USABLE
Blur band a theme is built at.
CELL_ADMITTED
Cell band a document may state for the Pixelated set, logical pixels.
CELL_USABLE
The cell band the Pixelated set is built at.
COVER_ADMITTED
Tint band for the Pixelated and Shader sets: the ground’s opacity over what they sample. Any, as for Default; legibility is the band’s.
DEFAULT
The name a document gives the Default set.
DISPERSION_ADMITTED
The Liquid set’s dispersion: red and blue set apart by up to this fraction of the bend. Past half the fringe is a rainbow, not glass.
DITHER_ADMITTED
A shade a document may state for a dither’s strength: the cells and grid marks of the Pixelated set, and the pattern of the Shader set. Past half the dither reads as a texture of its own, not as the surface’s tone.
GLASS
The name a document gives the Glass set.
LIGHT_ADMITTED
Edge highlight and specular band: past half they read as a second surface, not light on this one.
LIGHT_ANGLE_ADMITTED
The Liquid set’s light_angle: the direction the light comes from, degrees counter-clockwise from the right (90 from above).
LIQUID
The name a document gives the Liquid set.
PIXELATED
The name a document gives the Pixelated set.
REFRACTION_ADMITTED
Refraction band, logical pixels of displacement at the rim.
SATURATION_ADMITTED
Saturation band: 0 grey, 1 as it is, 2 twice as vivid.
SHADER
The name a document gives the Shader set.
SHADER_PHASE_ADMITTED
The Shader set’s phase band: an offset a pattern starts from.
SHADER_SCALE_ADMITTED
The Shader set’s scale band: a cell or pattern size, logical pixels.
TINT_ADMITTED
Tint band: any. Legibility is the backdrop band’s, not the tint’s.

Functions§

block_set
The Block set.
builtin
The built-in set name a document may name without installing anything.
default_set
The Default set.
glass_set
The Glass set.
liquid_set
The Liquid set.
pixelated_set
The Pixelated set.
shader_set
The Shader set.