Skip to main content

Crate gpui_material_theme

Crate gpui_material_theme 

Source
Expand description

Material 3 theme values for a host toolkit.

The caller owns the theme and supplies current window metrics and system preferences.

Structs§

Argb
A packed 8-bit sRGB color in alpha, red, green, blue order.
ColorPair
Resolved foreground and background colors for a Material pairing.
ColorScheme
All semantic color roles for one appearance, with per-role overrides.
CubicBezier
The two control points of a cubic B?zier easing from (0, 0) to (1, 1).
FontFamilies
Family preference and ordered fallback for one typeface.
LayoutPolicy
Pure layout inputs. Widths and geometry are already in logical units.
MaterialTheme
Application-owned configuration consumed by the Material rendering layer.
Spring
Material spring parameters for unit mass.
TypeStyle
Material type metrics in scale-independent units (sp).
Typography
Family names for the Material scale. The host resolves available fonts and measures the resulting text.

Enums§

Appearance
The selected appearance. The host resolves any system preference.
ColorRole
Semantic Material color roles.
CornerRole
CornerShape
Logical rounded corners in top-start, top-end, bottom-end, bottom-start order.
Density
Desktop density adjustment for a component’s visual size.
Direction
Elevation
The six Material elevation levels. The renderer supplies the shadow.
MaterialShape
Named Material 3 Expressive shapes matching pinned Compose MaterialShapes.
MotionKind
Spatial springs move or reshape an element. Effects springs drive properties such as color and opacity and use critical damping.
MotionScheme
Standard and Expressive schemes from the fixed Material 3 reference.
MotionSpec
MotionSpeed
PolygonRole
PolygonSpec
Inputs for the finite rounded polygons used as morph endpoints. These are source coordinates before path generation and normalization.
StateLayer
Material state layer opacities.
TokenValue
The typed value of a token from the bundled data. Semantic color roles resolve through the current ColorScheme.
TypeRole
One of the fifteen Material text roles.
Typeface
The two Material typeface families.
TypographyEmphasis
WidthClass
Material window width classes, based on available logical width.

Functions§

token
Looks up an exact, case-sensitive token name from the bundled Material data.