pub struct Theme {
pub no_color: bool,
pub color_support: ColorSupport,
pub mode: ThemeMode,
/* private fields */
}Expand description
Theme configuration supporting --no-color mode and adaptive light/dark
palettes.
The theme is deterministic: given the same (ThemeMode, ColorSupport),
all style methods return identical Style values (Requirement 35.8 /
Property 34). ColorSupport::None always takes precedence over the mode —
no colours are emitted regardless of palette (Req 35.7).
Fields§
§no_color: bool§color_support: ColorSupport§mode: ThemeModeImplementations§
Source§impl Theme
impl Theme
Sourcepub fn new(no_color: bool, mode: ThemeMode) -> Self
pub fn new(no_color: bool, mode: ThemeMode) -> Self
Create a new theme with automatic colour-support detection and an
explicitly resolved ThemeMode.
Sourcepub fn with_color_support(color_support: ColorSupport) -> Self
pub fn with_color_support(color_support: ColorSupport) -> Self
Create a theme with an explicit colour-support level (useful for
testing). Defaults to ThemeMode::Dark for backward compatibility.
Sourcepub fn with_color_support_mode(
color_support: ColorSupport,
mode: ThemeMode,
) -> Self
pub fn with_color_support_mode( color_support: ColorSupport, mode: ThemeMode, ) -> Self
Create a theme with an explicit colour-support level and mode.
Sourcepub fn toggle_mode(&mut self)
pub fn toggle_mode(&mut self)
Toggle between Dark and Light mode at runtime (Req 35.6), rebuilding the active palette.
pub fn list_item(&self) -> Style
pub fn list_selected(&self) -> Style
pub fn detail_key(&self) -> Style
pub fn detail_value(&self) -> Style
pub fn status_bar(&self) -> Style
pub fn help_bar(&self) -> Style
pub fn error_style(&self) -> Style
pub fn search_style(&self) -> Style
pub fn border_style(&self) -> Style
Sourcepub fn border_focused(&self) -> Style
pub fn border_focused(&self) -> Style
Style for the focused panel border (Requirement 16.6). Visually distinct from unfocused borders to indicate active panel.
Sourcepub fn border_unfocused(&self) -> Style
pub fn border_unfocused(&self) -> Style
Style for unfocused panel border (Requirement 16.6). Subdued compared to focused border.
Sourcepub fn gate_not_run(&self) -> Style
pub fn gate_not_run(&self) -> Style
Style for validation gate status: NotRun (dim/gray).
Sourcepub fn gate_running(&self) -> Style
pub fn gate_running(&self) -> Style
Style for validation gate status: Running (warning/yellow).
Sourcepub fn gate_passed(&self) -> Style
pub fn gate_passed(&self) -> Style
Style for validation gate status: Passed (green).
Sourcepub fn gate_failed(&self) -> Style
pub fn gate_failed(&self) -> Style
Style for validation gate status: Failed (red).
Sourcepub fn gate_timed_out(&self) -> Style
pub fn gate_timed_out(&self) -> Style
Style for validation gate status: TimedOut (info/magenta).
Sourcepub fn filter_chip(&self) -> Style
pub fn filter_chip(&self) -> Style
Style for filter chips display.
Sourcepub fn sparkline_filled(&self) -> Style
pub fn sparkline_filled(&self) -> Style
Style for sparkline bar (filled portion).
Sourcepub fn sparkline_empty(&self) -> Style
pub fn sparkline_empty(&self) -> Style
Style for sparkline bar (empty portion).
Sourcepub fn help_overlay_title(&self) -> Style
pub fn help_overlay_title(&self) -> Style
Style for help overlay title.
Sourcepub fn help_overlay_section(&self) -> Style
pub fn help_overlay_section(&self) -> Style
Style for help overlay section header.
Sourcepub fn completion_highlight(&self) -> Style
pub fn completion_highlight(&self) -> Style
Style for completion suggestion (highlighted).
Sourcepub fn completion_normal(&self) -> Style
pub fn completion_normal(&self) -> Style
Style for completion suggestion (normal).
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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