Skip to main content

theme_watch

Function theme_watch 

Source
pub fn theme_watch<F>(on_change: F)
where F: Fn(String, Value) + Send + 'static,
Expand description

Watch the shared theme for changes and invoke on_change(scheme, ui) — once immediately (so the caller converges to the current value) and thereafter whenever global.toml changes, from this app or any other. Spawns a background thread and returns at once. An app backend uses this to push live theme updates into its UI (emit a Tauri/JUCE theme-changed event).