Struct QuickTileFace
pub struct QuickTileFace {
pub rect: Rect,
pub main: Rect,
pub expand: Option<Rect>,
pub on: bool,
pub hovered: Option<Rect>,
pub ground: AlphaColor<Srgb>,
pub radius: f64,
}Expand description
A Quick Settings tile’s ground: its switch half (main) and, when it
has a section, its chevron half (expand).
Fields§
§rect: RectThe whole tile.
main: RectThe switch half.
expand: Option<Rect>The chevron half, when the tile has a section.
on: bool§hovered: Option<Rect>The half under the pointer, if any.
ground: AlphaColor<Srgb>The floor the tile stands on, which its on fill is tinted over.
radius: f64The tile’s corner radius.
Implementations§
§impl QuickTileFace
impl QuickTileFace
pub fn fill(&self, theme: &Theme) -> AlphaColor<Srgb>
pub fn fill(&self, theme: &Theme) -> AlphaColor<Srgb>
The tile’s own fill: the floor its host painted, lifted and washed with the accent when it is on.
pub fn paint_ground(
&self,
scene: &mut Scene,
transform: Affine,
theme: &Theme,
off_hover: AlphaColor<Srgb>,
)
pub fn paint_ground( &self, scene: &mut Scene, transform: Affine, theme: &Theme, off_hover: AlphaColor<Srgb>, )
Paint the on fill (a tile that is off keeps the control ground its
host painted) and lift the half under the pointer: by the accent on
a tile that is on, by off_hover on one that is off.
pub fn ink(&self, theme: &Theme) -> (AlphaColor<Srgb>, AlphaColor<Srgb>)
pub fn ink(&self, theme: &Theme) -> (AlphaColor<Srgb>, AlphaColor<Srgb>)
The tile’s primary and secondary ink.
pub fn glyph_ink(&self, theme: &Theme) -> AlphaColor<Srgb>
pub fn glyph_ink(&self, theme: &Theme) -> AlphaColor<Srgb>
The glyph’s ink: the accent on a tile that is on, the primary ink on one that is off.
pub fn paint_divider(
&self,
scene: &mut Scene,
transform: Affine,
theme: &Theme,
inset_y: f64,
)
pub fn paint_divider( &self, scene: &mut Scene, transform: Affine, theme: &Theme, inset_y: f64, )
The hairline that sets the chevron half apart, inset_y in from the
tile’s top and bottom.
Trait Implementations§
§impl Clone for QuickTileFace
impl Clone for QuickTileFace
§fn clone(&self) -> QuickTileFace
fn clone(&self) -> QuickTileFace
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 QuickTileFace
impl Debug for QuickTileFace
impl Copy for QuickTileFace
Auto Trait Implementations§
impl Freeze for QuickTileFace
impl RefUnwindSafe for QuickTileFace
impl Send for QuickTileFace
impl Sync for QuickTileFace
impl Unpin for QuickTileFace
impl UnsafeUnpin for QuickTileFace
impl UnwindSafe for QuickTileFace
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
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