Skip to main content

frame

Function frame 

Source
pub fn frame<R>(
    ui: &mut Ui,
    depth: Depth,
    palette: &Palette,
    style: FrameStyle,
    add_contents: impl FnOnce(&mut Ui) -> R,
) -> R
Expand description

Draw a region at a given Depth: its fill and its edge, together.

Depth::Flat gets neither, and inherits whatever it sits on. That is the difference between level-with and painted-the-same-colour, and it is the reason Depth::fill returns an Option rather than defaulting to the page.