pub struct ThemeSpec {
pub name: &'static str,
pub dark: bool,
pub primary: Rgb,
pub secondary: Option<Rgb>,
pub warning: Option<Rgb>,
pub error: Option<Rgb>,
pub success: Option<Rgb>,
pub accent: Option<Rgb>,
pub foreground: Option<Rgb>,
pub background: Option<Rgb>,
pub surface: Option<Rgb>,
pub panel: Option<Rgb>,
}Expand description
Raw palette, as authored in textual/theme.py. Build custom ones with ThemeSpec::new.
Fields§
§name: &'static str§dark: bool§primary: Rgb§secondary: Option<Rgb>§warning: Option<Rgb>§error: Option<Rgb>§success: Option<Rgb>§accent: Option<Rgb>§foreground: Option<Rgb>§background: Option<Rgb>§surface: Option<Rgb>§panel: Option<Rgb>Implementations§
Source§impl ThemeSpec
impl ThemeSpec
pub const fn secondary(self, c: Rgb) -> Self
pub const fn warning(self, c: Rgb) -> Self
pub const fn error(self, c: Rgb) -> Self
pub const fn success(self, c: Rgb) -> Self
pub const fn accent(self, c: Rgb) -> Self
pub const fn foreground(self, c: Rgb) -> Self
pub const fn background(self, c: Rgb) -> Self
pub const fn surface(self, c: Rgb) -> Self
pub const fn panel(self, c: Rgb) -> Self
pub fn resolve(&self) -> Theme
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ThemeSpec
impl RefUnwindSafe for ThemeSpec
impl Send for ThemeSpec
impl Sync for ThemeSpec
impl Unpin for ThemeSpec
impl UnsafeUnpin for ThemeSpec
impl UnwindSafe for ThemeSpec
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