Skip to main content

rail_caption_lines

Function rail_caption_lines 

pub fn rail_caption_lines(
    theme: &Theme,
    text_renderer: &mut TextRenderer,
    label: &str,
    max_w: f64,
) -> Vec<String>
Expand description

A rail caption broken into at most two lines of max_w, only at spaces: a single word never breaks inside, it elides when it is longer than the line, and so does the second line.