pub struct Theme {Show 19 fields
pub background: Color,
pub text: Color,
pub text_bright: Color,
pub highlight: Color,
pub dim: Color,
pub red: Color,
pub yellow: Color,
pub green: Color,
pub cyan: Color,
pub purple: Color,
pub blue: Color,
pub selection_bg: Color,
pub selection_border: Color,
pub selection_id: Color,
pub search_match_bg: Color,
pub search_match_fg: Color,
pub flash_bg: Color,
pub bulk_selection_bg: Color,
pub tag_colors: HashMap<String, Color>,
}Expand description
Parsed color theme for the TUI
Fields§
§background: Color§text: Color§text_bright: Color§highlight: Color§dim: Color§red: Color§yellow: Color§green: Color§cyan: Color§purple: Color§blue: Color§selection_bg: Color§selection_border: Color§selection_id: Color§search_match_bg: Color§search_match_fg: Color§flash_bg: Color§bulk_selection_bg: ColorBackground for selected rows in SELECT mode
tag_colors: HashMap<String, Color>Per-tag colors
Implementations§
Source§impl Theme
impl Theme
Sourcepub fn from_config(ui: &UiConfig) -> Self
pub fn from_config(ui: &UiConfig) -> Self
Create a theme from project UI config, falling back to defaults
Sourcepub fn tag_color(&self, tag: &str) -> Color
pub fn tag_color(&self, tag: &str) -> Color
Get the color for a tag, falling back to text color
Sourcepub fn state_color(&self, state: TaskState) -> Color
pub fn state_color(&self, state: TaskState) -> Color
Get the color for a task state
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Theme
impl RefUnwindSafe for Theme
impl Send for Theme
impl Sync for Theme
impl Unpin for Theme
impl UnsafeUnpin for Theme
impl UnwindSafe for Theme
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<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