Module chrome_body
Expand description
The body of the system’s chrome — a bar or a dock — as a described component.
A bar and a dock stand over what they cover, so their ground is the theme’s bar finish
(crate::tokens::SurfaceRole::Bar) rather than any app’s colour: edge to edge and square
at the full fit, a rounded body inset from the edges at the floating one. A view says
which through ChromeShape and what the body is made of through ChromeMaterial; the
theme resolves that into a finish, and the shape follows the theme’s radii so a rounder
theme is rounder chrome.
Structs§
- Chrome
Body ChromePropsbuilt: a padded container whose ground the theme paints.- Chrome
Props - A bar or a dock’s body: the theme’s bar finish behind what the body holds.
Enums§
- Chrome
Edge - The edge of the screen a bar or a dock stands on: the side of its body the content is. A square body casts no rule from it (bars cast none, design-language.md); it says which way a floating, rounded body’s hairline faces and how a view lays its content out.
- Chrome
Shape - How a bar or a dock’s body sits in its edge.
Functions§
- paint_
bar_ body - The square body of a bar standing edge to edge in the screen’s own edge,
in
rect: the theme’s bar finish over its own panel ground and the edge the theme gives it along its foot. Bars cast no rule at the screen’s edge (design-language.md), so a square body paints no outline; a shell’s bar paints this and its controls on top.