chore: remove deprecated systemPreferences color scheme events (#39341)

This commit is contained in:
David Sanders
2023-08-14 01:37:18 -07:00
committed by GitHub
parent cf658b700d
commit d166182865
6 changed files with 21 additions and 49 deletions

View File

@@ -365,7 +365,10 @@ if (process.platform !== 'win32' || systemPreferences.isAeroGlassEnabled()) {
if (process.platform === 'win32') {
systemPreferences.on('color-changed', () => { console.log('color changed'); });
// @ts-expect-error Removed API
systemPreferences.on('inverted-color-scheme-changed', (_, inverted) => console.log(inverted ? 'inverted' : 'not inverted'));
// @ts-expect-error Removed API
systemPreferences.on('high-contrast-color-scheme-changed', (_, highContrast) => console.log(highContrast ? 'high contrast' : 'not high contrast'));
console.log('Color for menu is', systemPreferences.getColor('menu'));
}