pub struct ContainerProps {
pub fill: Option<Paint>,
pub corner_radius: f64,
pub corners: Corners,
pub border: Option<Border>,
pub shadow: Option<Shadow>,
pub clips: bool,
pub role: Option<SurfaceRole>,
}Expand description
A container’s native surface (docs/surfaces.md): what .background(..),
.corner_radius(..), .border(..), .shadow(..), .surface(..) and .card() realize.
Fields§
§fill: Option<Paint>What fills the surface: a solid Ink or a linear, radial or conic
gradient. A gradient’s unit points resolve against the surface’s frame and follow it
when it resizes. Every ink follows the appearance (docs/color.md “How a toolkit
follows the appearance”).
corner_radius: f64§corners: CornersWhich corners Self::corner_radius rounds; the default is all four.
border: Option<Border>A line around the edge, inside the frame, following the rounded corners, drawn over the surface’s content on every toolkit: a child that reaches the edge never covers it.
shadow: Option<Shadow>A shadow of the surface’s rounded rectangle, drawn outside its frame. A surface
with a shadow is built with clips: false: the shadow lies outside the bounds a
clip would cut to, and on most toolkits the two cannot share a view.
clips: bool§role: Option<SurfaceRole>Semantic, theme-adaptive surface, mapped by each backend to a native material that
follows the platform’s light/dark appearance automatically (it overrides
Self::fill when set).