//! Selection chrome: the marker glyph and the selected-row style. //! //! Ported from sysop-tui's `selection.rs`, retinted from the theme. The marker //! stays a plain triangle rather than a Nerd Font glyph so selection survives //! a console without the patched font — the TTY before the session starts, a //! remote shell, `alloy` over SSH. Per docs/ICONOGRAPHY.md, Nerd Font glyphs //! decorate; they never carry state on their own. use ratatui::style::{Modifier, Style}; use crate::theme::Theme; /// The selected-row marker. Rendered in the gutter, one cell plus a space. pub const MARKER: &str = "▶"; /// Blank gutter for unselected rows — the same width as [`MARKER`], so rows do /// not shift horizontally as selection moves. pub const MARKER_BLANK: &str = " "; /// Style for the selected row. /// /// Uses `surface.raised` as the selection field rather than an accent fill: /// DESIGN-LANGUAGE.md keeps color off chrome, so selection reads as a *raised* /// surface plus weight, and any `Severity` color already on the row survives /// unchanged instead of being drowned by an accent background. pub fn selected_style(theme: &Theme) -> Style { Style::default() .bg(theme.surface_raised) .fg(theme.content_primary) .add_modifier(Modifier::BOLD) } /// Style for an unselected row. pub fn unselected_style(theme: &Theme) -> Style { Style::default().fg(theme.content_secondary) }