feat: add new nativeTheme API (#19656)
* feat: add new nativeTheme API * chore: deprecate and clean up old systemPreferences theme APIs in favor of new nativeTheme module * chore: clean up and deprecate things per feedback * chore: add tests for deprecate and clean up invert impl * build: when is a boolean not a boolean???
This commit is contained in:
parent
246187a20f
commit
efa1818cb4
16 changed files with 343 additions and 29 deletions
22
spec-main/api-native-theme-spec.ts
Normal file
22
spec-main/api-native-theme-spec.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
import { expect } from 'chai'
|
||||
import { nativeTheme } from 'electron'
|
||||
|
||||
describe('nativeTheme module', () => {
|
||||
describe('nativeTheme.shouldUseDarkColors', () => {
|
||||
it('returns a boolean', () => {
|
||||
expect(nativeTheme.shouldUseDarkColors).to.be.a('boolean')
|
||||
})
|
||||
})
|
||||
|
||||
describe('nativeTheme.shouldUseInvertedColorScheme', () => {
|
||||
it('returns a boolean', () => {
|
||||
expect(nativeTheme.shouldUseInvertedColorScheme).to.be.a('boolean')
|
||||
})
|
||||
})
|
||||
|
||||
describe('nativeTheme.shouldUseHighContrastColors', () => {
|
||||
it('returns a boolean', () => {
|
||||
expect(nativeTheme.shouldUseHighContrastColors).to.be.a('boolean')
|
||||
})
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue