The NSAppearanceCustomization protocol for retrieving the appearance of the window, instead of using the application-wide -[NSApplication effectiveAppearance].
Key-Value observing for observing the effectiveAppearance to compute the ThemeChanged event, instead of using the undocumented AppleInterfaceThemeChangedNotification notification.
This also fixes WindowBuilder::with_theme not having any effect (fixes https://github.com/alacritty/alacritty/issues/8046), and the conversion between Theme and NSAppearance is made a bit more robust.
[x] Tested on all platforms changed
[x] Added an entry to the changelog module if knowledge of this change could be valuable to users
[x] Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
[x] Created or updated an example program if it would help users understand this functionality
This new implementation uses:
-[NSApplication effectiveAppearance]
.effectiveAppearance
to compute theThemeChanged
event, instead of using the undocumentedAppleInterfaceThemeChangedNotification
notification.This also fixes
WindowBuilder::with_theme
not having any effect (fixes https://github.com/alacritty/alacritty/issues/8046), and the conversion betweenTheme
andNSAppearance
is made a bit more robust.changelog
module if knowledge of this change could be valuable to users