Skip to main content

attach_system_theme_observer

Function attach_system_theme_observer 

Source
pub fn attach_system_theme_observer(window: &mut Window, cx: &mut App)
Expand description

Attach System theme tracking to a concrete GPUI window.

init_liora_with_mode(cx, ThemeMode::System) runs before a window exists and can only use the app-level appearance snapshot. Following Zed’s main-window pattern, create the window with WindowOptions { show: false, .. }, call this at the start of the open_window callback before constructing the root view, then activate the returned window handle after open_window completes.