Skip to main content

build_tui_theme

Function build_tui_theme 

Source
pub fn build_tui_theme(
    config: &ConfigRegistry,
    resolved: &ResolvedTheme,
    ids: &BuiltinElementIds,
) -> Theme
Expand description

Build the ratatui-typed Theme cache from the resolved theme table plus the non-style ui.* typed options. The TUI’s App.theme cache is the renderer’s hot-path adapted view; it is rebuilt at theme-change / option-set rate, never per frame.

T.4 (theme-system): the style elements source from the host_theme::ResolvedTheme table (the single source of truth) via the captured host_theme::BuiltinElementIds. The cache itself stays — it is the safeguard that keeps per-line decoration painting free of per-frame style adaptation (design §10.1; feedback_renderer_cache_protects_ux).

T.6.t: the host Theme struct is deleted; the 8 non-style fields (dim_inactive_panes, pane_separator_{vertical,horizontal}, nerd_fonts, the four diagnostic_*_glyph chars) now source from the typed-options registry via config (default-fallback matches the deleted struct’s literals exactly). Style fields keep sourcing from resolved / ids.