Skip to main content

from_system

Function from_system 

Source
pub fn from_system() -> Result<Theme>
Expand description

Detect the OS theme and convert it to a gpui-component Theme in one call.

Combines SystemTheme::from_system() with to_theme() using the system-detected name and dark-mode preference.

§Errors

Returns an error if the platform theme cannot be read (e.g., unsupported platform, missing desktop environment).

§Examples

let theme = native_theme_gpui::from_system()?;