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
bluror atint, 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 (
refractionacross aband), straight in the flat middle, optionally softened (blur) and fringed (dispersion), with a thin specular rim lit fromlight_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:
0grey,1as it is,2twice as vivid. - SHADER
- The name a document gives the Shader set.
- SHADER_
PHASE_ ADMITTED - The Shader set’s
phaseband: an offset a pattern starts from. - SHADER_
SCALE_ ADMITTED - The Shader set’s
scaleband: 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
namea 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.