#[non_exhaustive]pub struct Theme {Show 34 fields
pub text: Color,
pub accent: Color,
pub result_accent: Color,
pub focus: Color,
pub success: Color,
pub info: Color,
pub warning: Color,
pub metadata: Color,
pub border: Color,
pub shell_border: Color,
pub panel_focus_border: Color,
pub error: Color,
pub dim: Color,
pub input_bg: Color,
pub shell_bg: Color,
pub sidebar_bg: Color,
pub workspace_bg: Color,
pub focus_bg: Color,
pub panel_bg: Color,
pub surface_raised: Color,
pub header_bg: Color,
pub selection_bg: Color,
pub selection_fg: Color,
pub selected_idle_bg: Color,
pub selected_idle_fg: Color,
pub pill_bg: Color,
pub badge_bg: Color,
pub primary_action_bg: Color,
pub primary_action_fg: Color,
pub secondary_action_bg: Color,
pub secondary_action_fg: Color,
pub preview_bg: Color,
pub overlay_bg: Color,
pub divider: Color,
}Expand description
Public configuration and theming types. UI colors used across the TUI.
Most applications can start from Theme::from_preset and override only the fields they
want to change.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.text: ColorPrimary text color.
accent: ColorAccent color for interactive UI chrome.
result_accent: ColorAccent color for breadcrumb and command/result emphasis.
focus: ColorFocus treatment color for active controls and panels.
success: ColorSuccess-oriented feedback color.
info: ColorInformative accent for source and state metadata.
warning: ColorCaution-oriented color reserved for non-error warning states.
metadata: ColorPassive metadata and descriptive text color.
border: ColorBorder color.
shell_border: ColorBorder color for passive shell chrome.
panel_focus_border: ColorFocused interactive panel border color.
error: ColorError color.
dim: ColorDimmed text color.
input_bg: ColorInput background color.
shell_bg: ColorBackground for the outer shell frame.
Background for the navigation surface.
workspace_bg: ColorBackground for the active editing surface.
focus_bg: ColorFocused row background color.
panel_bg: ColorPanel background color.
surface_raised: ColorRaised surface for selected rows and compact controls.
header_bg: ColorHeader band background color.
selection_bg: ColorFilled background for selected items.
selection_fg: ColorForeground for selected items.
selected_idle_bg: ColorBackground for selected but unfocused items.
selected_idle_fg: ColorForeground for selected but unfocused items.
pill_bg: ColorPill background color.
badge_bg: ColorBadge background color for compact metadata chips.
primary_action_bg: ColorPrimary action background color.
primary_action_fg: ColorPrimary action foreground color.
secondary_action_bg: ColorSecondary action background color.
secondary_action_fg: ColorSecondary action foreground color.
preview_bg: ColorBackground for the read-only preview band.
overlay_bg: ColorBackground for overlays such as dropdowns and help.
divider: ColorDivider color.
Implementations§
Source§impl Theme
impl Theme
Sourcepub fn from_preset(preset: ThemePreset) -> Self
pub fn from_preset(preset: ThemePreset) -> Self
Build a theme from a built-in preset.
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
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>
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