pub trait SystemThemeExt {
// Required method
fn to_gpui_theme(&self) -> Theme;
}Expand description
Extension trait for converting a SystemTheme to a gpui-component Theme.
Useful when you already have a SystemTheme and want method syntax:
ⓘ
use native_theme_gpui::SystemThemeExt;
let sys = native_theme::SystemTheme::from_system()?;
let theme = sys.to_gpui_theme();Required Methods§
Sourcefn to_gpui_theme(&self) -> Theme
fn to_gpui_theme(&self) -> Theme
Convert this system theme to a gpui-component Theme.
Uses the active variant (based on is_dark), the theme name,
and the dark-mode flag from the SystemTheme.