mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-08-27 13:54:11 +02:00
fix(appearance): detect the macOS system appearance via NSApp.effectiveAppearance (#603)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
ce8cb5e7bc
commit
aa76d501f0
@@ -1367,6 +1367,16 @@ pub fn run() {
|
||||
debug!("Launched Yaak {:?}", info);
|
||||
});
|
||||
}
|
||||
RunEvent::WindowEvent { event: WindowEvent::ThemeChanged(_), .. } => {
|
||||
// On macOS this is how OS appearance changes arrive: tao observes
|
||||
// AppleInterfaceThemeChangedNotification and emits it for every window
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
if let Some(state) =
|
||||
app_handle.try_state::<yaak_system_appearance::SystemAppearanceState>()
|
||||
{
|
||||
yaak_system_appearance::emit_change(app_handle, &state);
|
||||
}
|
||||
}
|
||||
RunEvent::WindowEvent { event: WindowEvent::Focused(true), label, .. } => {
|
||||
#[cfg(any(target_os = "linux", target_os = "macos"))]
|
||||
if let Some(state) =
|
||||
|
||||
Reference in New Issue
Block a user