macOS: set the theme on the NSWindow, instead of application-wide
This new implementation uses: - 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, and the conversion between `Theme` and `NSAppearance` is made a bit more robust.
This commit is contained in:
parent
1552eb21f7
commit
db2c97a995
6 changed files with 150 additions and 84 deletions
|
|
@ -45,6 +45,7 @@ changelog entry.
|
|||
- On Web, let events wake up event loop immediately when using
|
||||
`ControlFlow::Poll`.
|
||||
- Bump MSRV from `1.70` to `1.73`.
|
||||
- On macOS, set the window theme on the `NSWindow` instead of application-wide.
|
||||
|
||||
### Removed
|
||||
|
||||
|
|
@ -55,3 +56,4 @@ changelog entry.
|
|||
### Fixed
|
||||
|
||||
- On X11, build on arm platforms.
|
||||
- On macOS, fixed `WindowBuilder::with_theme` not having any effect on the window.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue