pub enum PaletteStyle {
Show 13 variants
Primary,
Secondary,
Tertiary,
View,
Background,
TitlePrimary,
TitleSecondary,
Highlight,
HighlightInactive,
Shadow,
EditableText,
EditableTextCursor,
EditableTextInactive,
}Expand description
Style entry in a palette.
This represents a color “role”. The palette will resolve this to a Style.
For example, PaletteStyle::Highlight should be used when drawing highlighted text.
In the default palette, it will resolve to a Style made of:
- The
Reverseeffect (front and background will be swapped). - A front color of
PaletteColor::Highlight(but with the reverse effect, it will become the background color). - A back color of
PaletteColor::HighlightText(will become the front color).
From there, the PaletteColor::Highlight and PaletteColor::HighlightText will be resolved to
concrete colors (or possibly to InheritParent, which will inherit the previous concrete
color).
To override the look of highlighted text, you can either:
- Change the palette entries for
PaletteColor::Highlight/PaletteColor::HighlightText. - Change the palette entry for
PaletteStyle::Highlight, possibly using different palette colors instead (or directly specifying a concrete color there).
Variants§
Primary
Style used for regular text.
Secondary
Style used for secondary text.
Tertiary
Style used for tertiary text.
View
Style used for view background.
Background
Style used for application background (behind all views).
TitlePrimary
Style used for main titles.
TitleSecondary
Style used for secondary titles.
Highlight
Style used for highlighted text.
HighlightInactive
Style used for inactive highlighted text.
Shadow
Style used to draw the drop shadows (1-cell border to the bottom/right of views).
EditableText
Style used for editable text (TextArea, EditView).
EditableTextCursor
Style used for the selected character in editable text.
EditableTextInactive
Style used for editable text when inactive.
Implementations§
Trait Implementations§
Source§impl Clone for PaletteStyle
impl Clone for PaletteStyle
Source§fn clone(&self) -> PaletteStyle
fn clone(&self) -> PaletteStyle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PaletteStyle
impl Debug for PaletteStyle
Source§impl Enum for PaletteStyle
impl Enum for PaletteStyle
Source§impl<V> EnumArray<V> for PaletteStyle
impl<V> EnumArray<V> for PaletteStyle
Source§impl From<PaletteStyle> for StyleType
impl From<PaletteStyle> for StyleType
Source§fn from(style: PaletteStyle) -> Self
fn from(style: PaletteStyle) -> Self
Source§impl FromStr for PaletteStyle
impl FromStr for PaletteStyle
Source§impl Hash for PaletteStyle
impl Hash for PaletteStyle
Source§impl Index<PaletteStyle> for Palette
impl Index<PaletteStyle> for Palette
Source§impl IndexMut<PaletteStyle> for Palette
impl IndexMut<PaletteStyle> for Palette
Source§impl PartialEq for PaletteStyle
impl PartialEq for PaletteStyle
Source§impl Resolvable for PaletteStyle
impl Resolvable for PaletteStyle
impl Copy for PaletteStyle
impl Eq for PaletteStyle
impl StructuralPartialEq for PaletteStyle
Auto Trait Implementations§
impl Freeze for PaletteStyle
impl RefUnwindSafe for PaletteStyle
impl Send for PaletteStyle
impl Sync for PaletteStyle
impl Unpin for PaletteStyle
impl UnwindSafe for PaletteStyle
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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
key and return true if they are equal.