Skip to main content

to_theme

Function to_theme 

Source
pub fn to_theme(variant: &ThemeVariant, name: &str, is_dark: bool) -> Theme
Expand description

Convert a ThemeVariant into a gpui-component Theme.

Builds a complete Theme by:

  1. Mapping all 108 ThemeColor fields via colors::to_theme_color
  2. Building a ThemeConfig from fonts/geometry via config::to_theme_config
  3. Constructing the Theme from the ThemeColor and applying the config