Struct Elevation
pub struct Elevation {
pub floating: Shadow,
pub floating_edge: AlphaColor<Srgb>,
pub glass_inner: Shadow,
pub glass_outer: Shadow,
pub shadow_scale: f32,
}Expand description
Elevation, by the design language’s one rule: only floating things
cast a shadow. Window tiles, bars, cards and selected controls have
none — a tile is separated by the ground and its window edge, a
selection is a lift (crate::tokens::Intents::selection).
Fields§
§floating: ShadowThe one shadow a floating thing casts — a menu, popover, the
palette, a sheet, quick settings, a toast, a tooltip, a dragged
object: soft and wide, so it reads as distance rather than as an
outline. Paint it with crate::surface::shadow at the surface’s
own radius.
floating_edge: AlphaColor<Srgb>The 1 px inner light edge a floating surface draws on a dark material, just inside its outline. Transparent on a light material.
glass_inner: ShadowThe wheel disc’s rim light: a different vocabulary from a drop shadow, of which only the hue is read.
glass_outer: ShadowThe wheel disc’s outer bloom. Only the hue is read.
shadow_scale: f32The factor this material’s shadow was scaled by relative to the dark one, for a widget composing its own soft stack (a sprite, a ring).
Implementations§
Trait Implementations§
impl Copy for Elevation
impl StructuralPartialEq for Elevation
Auto Trait Implementations§
impl Freeze for Elevation
impl RefUnwindSafe for Elevation
impl Send for Elevation
impl Sync for Elevation
impl Unpin for Elevation
impl UnsafeUnpin for Elevation
impl UnwindSafe for Elevation
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more