pub struct ThemeShadows {
pub box_shadow: ThemeBoxShadowScale,
pub inset: ThemeInsetShadowScale,
pub drop: ThemeDropShadowScale,
pub text: ThemeTextShadowScale,
}Fields§
§box_shadow: ThemeBoxShadowScale§inset: ThemeInsetShadowScale§drop: ThemeDropShadowScale§text: ThemeTextShadowScaleImplementations§
Source§impl ThemeShadows
impl ThemeShadows
Sourcepub fn for_colors(colors: &ThemeColors) -> ThemeShadows
pub fn for_colors(colors: &ThemeColors) -> ThemeShadows
Scheme-aware elevation: Light casts faint shadows tinted with the theme’s text ink, Dark casts deeper black shadows, and the true-black OLED theme casts none at all — elevation there is drawn with borders.
Sourcepub fn light() -> ThemeShadows
pub fn light() -> ThemeShadows
Light ladder: 0 1px 2px 6%, 0 2px 10px 8%, 0 16px 40px 16%
anchors interpolated across the scale, tinted with near-black ink.
Sourcepub fn light_with_ink(shadow_ink: Color) -> ThemeShadows
pub fn light_with_ink(shadow_ink: Color) -> ThemeShadows
The light ladder cast with a custom shadow ink.
Sourcepub fn dark() -> ThemeShadows
pub fn dark() -> ThemeShadows
Mesh Dark ladder: 0 1px 2px 30%, 0 4px 16px 40%, 0 20px 48px 55%
anchors interpolated across the scale (pure black, deeper than Light).
Sourcepub fn none() -> ThemeShadows
pub fn none() -> ThemeShadows
No shadows anywhere: the Void/OLED elevation contract. Shadows are dead pixels on OLED; surfaces separate with borders instead.
Trait Implementations§
Source§impl Clone for ThemeShadows
impl Clone for ThemeShadows
Source§fn clone(&self) -> ThemeShadows
fn clone(&self) -> ThemeShadows
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ThemeShadows
Source§impl Debug for ThemeShadows
impl Debug for ThemeShadows
Source§impl Default for ThemeShadows
impl Default for ThemeShadows
Source§fn default() -> ThemeShadows
fn default() -> ThemeShadows
Returns the “default value” for a type. Read more
Source§impl PartialEq for ThemeShadows
impl PartialEq for ThemeShadows
impl StructuralPartialEq for ThemeShadows
Auto Trait Implementations§
impl Forget for ThemeShadows
impl Freeze for ThemeShadows
impl Move for ThemeShadows
impl RefUnwindSafe for ThemeShadows
impl Send for ThemeShadows
impl Sync for ThemeShadows
impl Unpin for ThemeShadows
impl UnsafeUnpin for ThemeShadows
impl UnwindSafe for ThemeShadows
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.