Skip to main content

apply

Function apply 

Source
pub fn apply(
    preference: &ThemePreferences,
    window: &mut Window,
    cx: &mut App,
) -> bool
👎Deprecated:

render-time path that leaves the Component theme stale; use init_component_theme and advance_component_theme with preference.resolve(system_dark(cx)), or apply_scheme for Base-only rendering

Expand description

Paint preference resolved against the system appearance. Call at the start of each root render; it schedules frames while a transition runs. Returns whether the paint changed this frame, so an application can mirror the scheme into other toolkits only when needed.

This render-time path does not update the Component theme.