Skip to main content

set_preview

Function set_preview 

Source
pub fn set_preview(ctx: &Context, role: Role, names: Option<Vec<String>>)
Expand description

Previews a role’s families before they are applied: the preview families (preview_family, drawn by with_preview) draw the faces found for names in priority order, the role’s families as installed behind them (so a name found nowhere draws the role’s families, never nothing), or the role’s families alone with None. The theme’s own families are untouched. Installed again at once when it changes (one slow frame, from the next pass); every install defines the preview families, so a theme switched while a preview is shown keeps it.