Skip to main content

observe_window

Function observe_window 

Source
pub fn observe_window(window: &mut Window, cx: &mut App) -> Subscription
Expand description

Subscribe a window to OS appearance changes. The returned Subscription must outlive the window — callers typically .detach() it.

The notification is per window, but the appearance it reports is a system setting, so any one window is enough to learn about the change; re-applying is idempotent when several fire.