Skip to main content

ThemeColors

Struct ThemeColors 

Source
pub struct ThemeColors {
Show 22 fields pub bg: Color, pub bg_secondary: Color, pub bg_highlight: Color, pub fg: Color, pub fg_dim: Color, pub fg_muted: Color, pub primary: Color, pub secondary: Color, pub accent: Color, pub success: Color, pub warning: Color, pub error: Color, pub info: Color, pub border: Color, pub border_focus: Color, pub selection: Color, pub logo_primary: Color, pub logo_secondary: Color, pub priority_low: Color, pub priority_medium: Color, pub priority_high: Color, pub priority_urgent: Color,
}
Expand description

Extended color palette for UI elements.

This provides pre-built styles and derived colors for Tickit’s UI, based on a theme’s base palette.

Fields§

§bg: Color§bg_secondary: Color§bg_highlight: Color§fg: Color§fg_dim: Color§fg_muted: Color§primary: Color§secondary: Color§accent: Color§success: Color§warning: Color§error: Color§info: Color§border: Color§border_focus: Color§selection: Color§logo_primary: Color§logo_secondary: Color§priority_low: Color§priority_medium: Color§priority_high: Color§priority_urgent: Color

Implementations§

Source§

impl ThemeColors

Source

pub fn from_palette(p: ThemePalette) -> Self

Create ThemeColors from a ThemePalette

Source

pub fn text(&self) -> Style

Default text style

Source

pub fn text_dim(&self) -> Style

Dimmed text style

Source

pub fn text_muted(&self) -> Style

Muted text style

Source

pub fn text_primary(&self) -> Style

Primary accent style

Source

pub fn text_secondary(&self) -> Style

Secondary accent style

Source

pub fn text_success(&self) -> Style

Success style

Source

pub fn text_warning(&self) -> Style

Warning style

Source

pub fn text_error(&self) -> Style

Error style

Source

pub fn text_info(&self) -> Style

Info style

Source

pub fn block(&self) -> Style

Block border style

Source

pub fn block_focus(&self) -> Style

Focused block border style

Source

pub fn selected(&self) -> Style

Selected item style

Source

pub fn tab(&self) -> Style

Tab style

Source

pub fn tab_active(&self) -> Style

Active tab style

Source

pub fn key_hint(&self) -> Style

Key hint style (for shortcuts)

Source

pub fn logo_style_primary(&self) -> Style

Logo primary style

Source

pub fn logo_style_secondary(&self) -> Style

Logo secondary style

Source

pub fn priority_style(&self, priority: Priority) -> Style

Style for a priority level

Trait Implementations§

Source§

impl Clone for ThemeColors

Source§

fn clone(&self) -> ThemeColors

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ThemeColors

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.