Skip to main content

from_system

Function from_system 

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

Detect the OS theme and convert it to an iced Theme in one call.

Returns the iced theme, the resolved variant, and whether the system is in dark mode. The is_dark flag comes from the OS preference, not from background color analysis.

ยงErrors

Returns an error if the platform theme cannot be read.