pub struct CycleStyle {
pub foreground: Color,
pub background: Color,
pub focused_foreground: Color,
pub focused_background: Color,
pub hovered_foreground: Color,
pub hovered_background: Color,
pub disabled_foreground: Color,
}Expand description
A cycle’s colors, sharing the List’s three background states.
At rest foreground sits on
background. Hover and focus use the corresponding
List backgrounds, with hover beating focus. Disabled mutes the text.
Fields§
§foreground: ColorValue color at rest.
background: ColorBackground at rest.
focused_foreground: ColorValue color while focused.
focused_background: ColorBackground while focused.
hovered_foreground: ColorValue color while hovered.
hovered_background: ColorBackground while hovered.
disabled_foreground: ColorValue color while disabled.
Implementations§
Source§impl CycleStyle
impl CycleStyle
Sourcepub const fn fallback() -> Self
pub const fn fallback() -> Self
The no-theme starting point: plain ANSI colors that render on any terminal, with the List’s three fallback backgrounds and readable text.
Sourcepub fn from_theme(theme: &Theme) -> Self
pub fn from_theme(theme: &Theme) -> Self
Colors derived from a theme: the List’s three backdrops, with the value keeping the theme’s foreground on them.
Trait Implementations§
Source§impl Clone for CycleStyle
impl Clone for CycleStyle
Source§fn clone(&self) -> CycleStyle
fn clone(&self) -> CycleStyle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CycleStyle
Source§impl Debug for CycleStyle
impl Debug for CycleStyle
impl Eq for CycleStyle
Source§impl PartialEq for CycleStyle
impl PartialEq for CycleStyle
impl StructuralPartialEq for CycleStyle
Auto Trait Implementations§
impl Freeze for CycleStyle
impl RefUnwindSafe for CycleStyle
impl Send for CycleStyle
impl Sync for CycleStyle
impl Unpin for CycleStyle
impl UnsafeUnpin for CycleStyle
impl UnwindSafe for CycleStyle
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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