Skip to main content

load_theme

Function load_theme 

Source
pub fn load_theme(
    theme_id: Option<&str>,
    profile_default: Option<&str>,
    registry: &ThemeRegistry,
    fallback: &Theme,
) -> Theme
Expand description

Load a theme by ID from the registry, with fallback.

This is the second half of theme resolution - after the theme ID has been resolved via ResolvedConfig, this function loads the actual Theme object.

ยงArguments

  • theme_id - Pre-resolved theme ID (from ResolvedConfig.theme_id)
  • profile_default - Adapter-specific default theme ID (layer 5)
  • registry - Theme registry to look up themes
  • fallback - Fallback theme if no match found