pub struct OverlayTokens {
pub sheet_corner_radius: u16,
pub dialog_corner_radius: u16,
pub popup_corner_radius: u16,
pub sheet_elevation: u16,
pub popup_elevation: u16,
pub dialog_elevation: u16,
pub sheet_padding: u16,
pub dialog_padding: u16,
pub popup_padding: u16,
pub scrim: u32,
pub toast_elevation: u16,
pub toast_corner_radius: u16,
}Expand description
Application-level overlay theme tokens for Dialog, Menu, Dropdown, Sheet and the transient message. Every measure is in dp, and 0 keeps the design system’s own.
Fields§
§sheet_corner_radius: u16§dialog_corner_radius: u16§popup_corner_radius: u16§sheet_elevation: u16§popup_elevation: u16§dialog_elevation: u16§sheet_padding: u16§dialog_padding: u16§popup_padding: u16§scrim: u32§toast_elevation: u16How high the transient message floats, which is how much shadow it casts.
toast_corner_radius: u16The corner radius of the transient message.
Implementations§
Source§impl OverlayTokens
impl OverlayTokens
pub const fn new() -> Self
pub const fn sheet_corner_radius(self, radius: u16) -> Self
pub const fn dialog_corner_radius(self, radius: u16) -> Self
pub const fn popup_corner_radius(self, radius: u16) -> Self
pub const fn sheet_elevation(self, elevation: u16) -> Self
pub const fn popup_elevation(self, elevation: u16) -> Self
pub const fn dialog_elevation(self, elevation: u16) -> Self
pub const fn sheet_padding(self, padding: u16) -> Self
pub const fn dialog_padding(self, padding: u16) -> Self
pub const fn popup_padding(self, padding: u16) -> Self
pub const fn scrim(self, color: Color) -> Self
pub const fn scrim_argb(self, argb: u32) -> Self
Sourcepub const fn toast_elevation(self, elevation: u16) -> Self
pub const fn toast_elevation(self, elevation: u16) -> Self
The transient message’s elevation in dp: a shadow under it the height of a surface that far up. A message is not a node and takes no Modifier, so this is where its shadow is set, once for the application.
Sourcepub const fn toast_corner_radius(self, radius: u16) -> Self
pub const fn toast_corner_radius(self, radius: u16) -> Self
The transient message’s corner radius in dp.
Trait Implementations§
Source§impl Clone for OverlayTokens
impl Clone for OverlayTokens
impl Copy for OverlayTokens
Source§impl Debug for OverlayTokens
impl Debug for OverlayTokens
Source§impl Default for OverlayTokens
impl Default for OverlayTokens
impl Eq for OverlayTokens
Source§impl PartialEq for OverlayTokens
impl PartialEq for OverlayTokens
impl StructuralPartialEq for OverlayTokens
Auto Trait Implementations§
impl Forget for OverlayTokens
impl Freeze for OverlayTokens
impl Move for OverlayTokens
impl RefUnwindSafe for OverlayTokens
impl Send for OverlayTokens
impl Sync for OverlayTokens
impl Unpin for OverlayTokens
impl UnsafeUnpin for OverlayTokens
impl UnwindSafe for OverlayTokens
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more