Struct RoleFinishes
pub struct RoleFinishes {
pub window: Finish,
pub control: Finish,
pub floating: Finish,
pub bar: Option<Finish>,
}Expand description
One finish per surface role: the theme document’s material role
(crate::theme::ThemeMaterial) as the toolkit paints it.
Fields§
§window: FinishThe window ground. Windows never overlap, so a translucent window shows the desktop behind it.
control: FinishRaised controls, over the window ground.
floating: FinishFloating chrome.
bar: Option<Finish>The top bar’s body, and the theme’s glass for a chrome the person asked to see what
lies below: the stock themes give the bar the glass material. None: a theme gives
the bar no body of its own, and it draws flat.
Implementations§
§impl RoleFinishes
impl RoleFinishes
pub fn stock() -> RoleFinishes
pub fn stock() -> RoleFinishes
The design language’s finishes: opaque windows and controls, the blurred floating material, and a glass bar.
pub fn solid() -> RoleFinishes
pub fn solid() -> RoleFinishes
Everything opaque: high contrast and forced colours.
pub fn of(&self, role: SurfaceRole) -> &Finish
pub fn of(&self, role: SurfaceRole) -> &Finish
The finish of role; a bar without a body reads as flat.
pub fn validate(&self) -> Result<(), &'static str>
pub fn usable(&self) -> RoleFinishes
pub fn usable(&self) -> RoleFinishes
These finishes with every parameter held to its usable band.
pub fn opaque(&self) -> RoleFinishes
pub fn opaque(&self) -> RoleFinishes
These finishes where nothing may be translucent.
Trait Implementations§
§impl Clone for RoleFinishes
impl Clone for RoleFinishes
§fn clone(&self) -> RoleFinishes
fn clone(&self) -> RoleFinishes
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 RoleFinishes
impl Debug for RoleFinishes
§impl Default for RoleFinishes
impl Default for RoleFinishes
§fn default() -> RoleFinishes
fn default() -> RoleFinishes
§impl PartialEq for RoleFinishes
impl PartialEq for RoleFinishes
impl StructuralPartialEq for RoleFinishes
Auto Trait Implementations§
impl Freeze for RoleFinishes
impl !RefUnwindSafe for RoleFinishes
impl Send for RoleFinishes
impl Sync for RoleFinishes
impl Unpin for RoleFinishes
impl UnsafeUnpin for RoleFinishes
impl !UnwindSafe for RoleFinishes
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