Skip to main content

control_face

Function control_face 

pub fn control_face(
    scene: &mut Scene,
    transform: Affine,
    body: &RoundedRect,
    fill: AlphaColor<Srgb>,
    theme: &Theme,
) -> bool
Expand description

Paint a control’s face (a button, a field’s well, a segmented track, a toggle’s body) with the control role’s painter set (crate::part_paint::Part::ControlFace), then the theme’s border around it. The rest face (surfaces.raised) is drawn at rest, where a set may let the window ground through it and light it; a face of any other fill (a primary action, a selection, a hover lift) is drawn selected: those carry state, and their ink is measured on them, so the toolkit’s sets keep them opaque. Returns whether a border was drawn, which stands in for the control’s own rest edge.