Skip to main content

content

Function content 

Source
pub fn content(floating: bool, cx: &App) -> Div
Expand description

The element an app’s main view is drawn in.

Floating, it is a card on the window’s chrome, Theme::sidebar_bg, which its parent paints: Theme::panel_radius corners, a hairline border and Theme::content_bg over the chrome. An opaque card casts theme::content_shadows; under Theme::vibrancy it casts none, since a shadow shows through a translucent fill. Flat, it is a plain Theme::window_bg fill with none of those.

The card has no margin. The caller sizes and places it: it is handed back unsized, as a flex row or column item would want it, and the space around it — Theme::CONTENT_INSET off the window’s edge and between two cards — is the parent’s padding and gaps.