Struct ThemeMaterial
pub struct ThemeMaterial {
pub window: Finish,
pub control: Finish,
pub floating: Finish,
pub bar: Option<Finish>,
pub selector: SelectorFinish,
}Expand description
What every surface role is made of (Finish per
crate::tokens::SurfaceRole), and the finish of selectors. A role a
document leaves out keeps its stock finish.
Fields§
§window: FinishThe window ground every app paints on.
control: FinishRaised controls: buttons, fields, tracks, cards.
floating: FinishFloating chrome: menus, popovers, the palette, sheets, notifications.
bar: Option<Finish>The top bar’s body, stock where a document leaves it out; null, the
bar stands on the desktop.
selector: SelectorFinishWhat the window group’s tab strip stands on, and the lit rim and hover film of the selectors in it and everywhere else.
Implementations§
§impl ThemeMaterial
impl ThemeMaterial
pub fn stock() -> ThemeMaterial
pub fn stock() -> ThemeMaterial
The design language’s materials.
pub fn opaque() -> ThemeMaterial
pub fn opaque() -> ThemeMaterial
Everything opaque, as high contrast paints.
pub fn roles(&self) -> RoleFinishes
pub fn roles(&self) -> RoleFinishes
The finish of every role.
Trait Implementations§
§impl Clone for ThemeMaterial
impl Clone for ThemeMaterial
§fn clone(&self) -> ThemeMaterial
fn clone(&self) -> ThemeMaterial
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ThemeMaterial
impl Debug for ThemeMaterial
§impl<'de> Deserialize<'de> for ThemeMaterial
impl<'de> Deserialize<'de> for ThemeMaterial
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ThemeMaterial, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ThemeMaterial, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl From<MaterialV7> for ThemeMaterial
impl From<MaterialV7> for ThemeMaterial
§fn from(old: MaterialV7) -> ThemeMaterial
fn from(old: MaterialV7) -> ThemeMaterial
The floating role keeps exactly the blur and tint schema 7 built it with; every other role takes its stock finish, as schema 7 had no way to name one.
§impl PartialEq for ThemeMaterial
impl PartialEq for ThemeMaterial
§impl Serialize for ThemeMaterial
impl Serialize for ThemeMaterial
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for ThemeMaterial
Auto Trait Implementations§
impl Freeze for ThemeMaterial
impl !RefUnwindSafe for ThemeMaterial
impl Send for ThemeMaterial
impl Sync for ThemeMaterial
impl Unpin for ThemeMaterial
impl UnsafeUnpin for ThemeMaterial
impl !UnwindSafe for ThemeMaterial
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> 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>, which can then be
downcast into Box<dyn 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>, which 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> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§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