Repository navigation
feat: add new nativeTheme API - #19656
Conversation
|
Now we're talking 🎉 |
There was a problem hiding this comment.
Lots of nits 😆 - super sorry. Additionally:
- Did you miss
module-keys.jsor isn't it used anymore? nativeTheme.shouldUseInvertedColorSchemedoesn't work on macOS for me (always false), butupdateevent gets fired when I toggle it- Afaik, the
nativeThememethods on Linux aren't implemented and default to some value - we should state that - Oh and we have some fake tests for the
sysPrefmethods - do we wanna move them to a newnativeThemeSpec?
This API is only implemented on Windows inside Chromium, it's a one liner to implement on macOS so I'll do that here as well.
Potentially, will have to review which APIs are implemented for linux 👍
New tests should be added here that the APIs "work" |
…or of new nativeTheme module
2828210 to
a88f572
Compare
a88f572 to
18dfc61
Compare
|
Release Notes Persisted
|
|
I have automatically backported this PR to "7-0-x", please check out #19758 |
|
Just updated today and didn't even know this was coming, awesome 🙌 |
This adds a new
nativeThemeAPI which extracts APIs fromsystemPreferences(which was becoming a bit of a dumping ground) and consolidates them all to be backed by Chromium'sNativeThememodule which is better implemented, more resilient and means we don't have to maintain the theme code 👍It also allows us to easily implement the
updatedevent.Notes: Added new
nativeThemeAPI to read and respond to changes in the OS's theme and color scheme