Skip to main content

Module material

Module material 

Source
Expand description

material — the material-glass float: wraps a popover/dialog card so its ENTIRE subtree paints inside one scene layer (a single draw order).

The single layer order is the point: with per-primitive bounds-tree ordering, a hover repaint elsewhere can reassign the card’s quads relative to siblings — inside one layer the card’s stacking is structural.

The blur is painted first, structurally under the content: inside one layer the order is blur, then shadow, tint, border, rows, text. It needs Window::paint_backdrop_blur from our gpui fork (macOS Metal only); elsewhere the primitive is ignored and the glass reads as the theme’s translucent tint over the OS window blur.

Structs§

Layered
Material

Constants§

MENU_BLUR
Backdrop-blur sigma for floating menu/dialog glass — the reference .glass-surface runs blur(44px), and the Theme::glass_overlay tint is thin enough that a 16px blur leaves backdrop detail ghosting through rows.

Functions§

layered
Paint child in its own scene layer, giving it a fresh draw order above everything painted so far in the enclosing layer.
material
Frost child (a popover card): backdrop-blurred on glass, pass-through on opaque platforms. corner_radius must match the card’s rounding.