Add system theme for Windows and Mac Electron builds #2882
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix
Picked up from PR #2135
Currently in our Electron builds we don't offer a system theme that responds to the OSs color preference but is available in the web app.
This enables it for both Windows and Mac builds. There appears to be a bug in Electron or Chromium on Linux that the app doesn't respond properly to changing the color preferences so it still won't work there. Possibly this will get resolved in Electron 13 due to come out May 25, 2021.
It also updates so that the system menu for Windows updates to be choice of theme in Simplenote itself. So if you specifically choose Light the menu will be light, same for dark, overriding the system color preference.
This semi addresses issues #2134 and #1799 as they will both be resolved for Mac and Windows, but still not working on the Linux builds.
Related issues:
nativeTheme.themeSource = 'dark'
does not work on Ubuntu 20 electron/electron#28887nativeTheme
not receivingupdated
event respecting Linux system preference change electron/electron#25925Windows Screen Recording
https://user-images.githubusercontent.com/1326294/116714765-76f26c00-a9ac-11eb-979c-c08ad8aeebf5.mov
Test
Needs testing on Mac, Windows, and Linux
Release