Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: `nativeTheme.themeSource` and a few nativeTheme fixes #20486

Merged
merged 5 commits into from Oct 8, 2019

Conversation

@MarshallOfSound
Copy link
Member

MarshallOfSound commented Oct 8, 2019

Backport all PRs for #19932 in a single lump

Notes:

  • Added nativeTheme.themeSource to allow apps to override Chromium and the OS's theme choice
  • Limited the nativeTheme API to the browser process only
  • Fix crash when the native OS theme changes
… theme choice (#19960)

* feat: add nativeTheme.shouldUseDarkColorsOverride to allow apps to override Chromiums theme choice

* spec: add tests for shouldUseDarkColorsOverride

* chore: add missing forward declarations

* refactor: rename overrideShouldUseDarkColors to themeSource

* chore: only run appLevelAppearance specs on Mojave and up

* chore: update patch with more info and no define

* Update spec-main/api-native-theme-spec.ts

Co-Authored-By: Jeremy Apthorp <jeremya@chromium.org>

* Update api-native-theme-spec.ts

* Update api-native-theme-spec.ts

* Update api-native-theme-spec.ts
Exposing these in the renderer didn't make sense as they weren't backed
by the same instance / value store.  This API should be browser only
especially now that we have nativeTheme.themeSource.  Exposing in
//common was a mistake from the beginning.
…0137)

* fix: emit updated on NativeTheme on the UI thread to avoid DCHECK

* Update atom_api_native_theme.cc

* spec: wait a few ticks for async events to emit so that test events do not leak into each other
…ynamic theme selection on linux (#19964)

This is just a after-creation setter for the `darkTheme` constructor option.  This is delibrately
a method and not a property as there is no getter.
@MarshallOfSound MarshallOfSound requested a review from electron/wg-upgrades as a code owner Oct 8, 2019
@trop trop bot mentioned this pull request Oct 8, 2019
@trop trop bot added 7-0-x backport labels Oct 8, 2019
@MarshallOfSound MarshallOfSound changed the title Theme backports feat: `nativeTheme.themeSource` and a few nativeTheme fixes Oct 8, 2019
@jkleinsc jkleinsc merged commit 0a9b201 into 7-0-x Oct 8, 2019
15 of 16 checks passed
15 of 16 checks passed
Valid Backport
Details
Artifact Comparison Changes Detected
Details
Semantic Pull Request ready to be squashed
Details
WIP Ready for review
Details
appveyor: win-ia32-testing AppVeyor build succeeded
Details
appveyor: win-ia32-testing-pr AppVeyor build succeeded
Details
appveyor: win-woa-testing AppVeyor build succeeded
Details
appveyor: win-x64-testing AppVeyor build succeeded
Details
appveyor: win-x64-testing-pr AppVeyor build succeeded
Details
build-linux Workflow: build-linux
Details
build-mac Workflow: build-mac
Details
electron-arm-testing Build #20191008.21 succeeded
Details
electron-arm64-testing Build #20191008.21 succeeded
Details
electron-woa-testing Build #20191008.19 succeeded
Details
lint Workflow: lint
Details
release-notes Release notes found
@release-clerk

This comment has been minimized.

Copy link

release-clerk bot commented Oct 8, 2019

Release Notes Persisted

  • Added nativeTheme.themeSource to allow apps to override Chromium and the OS's theme choice
  • Limited the nativeTheme API to the browser process only
  • Fix crash when the native OS theme changes
@jkleinsc jkleinsc deleted the theme-backports branch Oct 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.