pub struct Palette {
pub page: Color32,
pub raised: Color32,
pub overlay: Color32,
pub well: Color32,
pub bevel_light: Color32,
pub bevel_dark: Color32,
}Expand description
The resolved colours this renderer needs, as flat values.
Built by the app from whatever it already uses to resolve a theme, then held and reused. Deliberately not a trait and not string-keyed: a bevel is painted per widget per frame, and a map lookup per edge is a cost with nothing to show for it.
Fields§
§page: Color32surface-page.
raised: Color32surface-raised.
overlay: Color32surface-overlay.
well: Color32surface-well.
Required, not optional. makeover derives it for every theme from 2.3.0,
so a resolved palette without a well is not a thing that exists here.
It was an Option while that was untrue, and this renderer substituted
the page; makeover-tui keeps its own Option for a different reason,
since a terminal can have the colour and still be unable to show it.
bevel_light: Color32bevel-light.
bevel_dark: Color32bevel-dark.
Implementations§
Trait Implementations§
impl Copy for Palette
impl Eq for Palette
impl StructuralPartialEq for Palette
Auto Trait Implementations§
impl Freeze for Palette
impl RefUnwindSafe for Palette
impl Send for Palette
impl Sync for Palette
impl Unpin for Palette
impl UnsafeUnpin for Palette
impl UnwindSafe for Palette
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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>
Converts
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>
Converts
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