pub struct GlassScale {
pub chrome: GlassMaterial,
pub bar: GlassMaterial,
pub control: GlassMaterial,
}Expand description
The three glass tiers a Theme carries:
chrome (popovers/sheets/menus), bar (tab/nav/toolbars), and control
(buttons/toggles). See the module docs for each tier’s source recipe.
Fields§
§chrome: GlassMaterialPopovers, sheets, menus — the most opaque, highest-blur tier.
bar: GlassMaterialTab bars, nav bars, toolbars — a subtle mid-blur tier.
control: GlassMaterialButtons, toggles — a pure low-blur lens, no fill.
Implementations§
Source§impl GlassScale
impl GlassScale
Sourcepub fn opaque_material() -> Self
pub fn opaque_material() -> Self
The opaque scale: every tier is opaque —
blur_radius_intent == 0.0 and empty fill stacks — so a widget reading
GlassMaterial::is_opaque paints its surface-container role instead
of a translucent lens. This is the “one API on either design language”
seam: the same widget code reads theme.glass.<tier> and branches on
is_opaque().
Shadows reuse the Elevation::neutral table so the opaque path
lines up with that elevation ladder: chrome = level 3
(menus/dialogs), bar = level 2 (nav bar), control = level 1.