Struct Surfaces
pub struct Surfaces {
pub base: AlphaColor<Srgb>,
pub content: AlphaColor<Srgb>,
pub sidebar: AlphaColor<Srgb>,
pub inspector: AlphaColor<Srgb>,
pub raised: AlphaColor<Srgb>,
pub overlay: AlphaColor<Srgb>,
pub scrim: AlphaColor<Srgb>,
pub scrim_strength: f32,
pub material: AlphaColor<Srgb>,
pub material_blur_px: f32,
pub material_opacity: f32,
pub content_edge: AlphaColor<Srgb>,
}Expand description
The neutral material’s surfaces. Every one is opaque except
Self::material, and every one shares [Colors::neutral_hue].
Fields§
§base: AlphaColor<Srgb>The desktop ground behind tiles.
content: AlphaColor<Srgb>The window ground: every app’s background, owned by the framework.
The ink tiers (Colors::text_primary and friends) are defined on
this surface.
The navigation region of a window.
inspector: AlphaColor<Srgb>The detail / inspector region of a window.
raised: AlphaColor<Srgb>Fields, wells and objects inside content.
overlay: AlphaColor<Srgb>Floating chrome: menus, popovers, the palette, sheets. Opaque; the
blurred form is Self::material.
scrim: AlphaColor<Srgb>Opaque dim behind a modal. Strength belongs to the thing being lifted, hue belongs to the material, so the scrim recedes into the neutral family rather than punching a black hole through it.
scrim_strength: f32Strength of every scrim at full openness — behind a modal Panel, a
sheet or an overlay drawer — as chrome::fill_scrim reads it. Per
theme: dark themes dim harder, since their grounds are near black.
material: AlphaColor<Srgb>The blurred material floating chrome is made of: Self::overlay at
Self::material_opacity. Only for a surface the compositor blurs
behind; without a backdrop blur, paint the opaque Self::overlay
instead — unblurred translucency is never correct.
material_blur_px: f32Backdrop blur radius of Self::material, in logical pixels. 0
keeps floating chrome opaque.
material_opacity: f32Opacity of the Self::overlay tint over the blurred backdrop.
content_edge: AlphaColor<Srgb>The declared edge between a window tile and the desktop. Read it
through Colors::window_edge, which flips its polarity if the
ground would swallow it.
Trait Implementations§
impl StructuralPartialEq for Surfaces
Auto Trait Implementations§
impl Freeze for Surfaces
impl RefUnwindSafe for Surfaces
impl Send for Surfaces
impl Sync for Surfaces
impl Unpin for Surfaces
impl UnsafeUnpin for Surfaces
impl UnwindSafe for Surfaces
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