chore: remove deprecated systemPreferences methods (#26849)
This commit is contained in:
parent
6ccebdf712
commit
6932e17088
6 changed files with 29 additions and 50 deletions
|
@ -1,4 +1,3 @@
|
|||
import { deprecate } from 'electron/main';
|
||||
const { systemPreferences } = process._linkedBinding('electron_browser_system_preferences');
|
||||
|
||||
if ('getAppLevelAppearance' in systemPreferences) {
|
||||
|
@ -17,20 +16,4 @@ if ('getEffectiveAppearance' in systemPreferences) {
|
|||
});
|
||||
}
|
||||
|
||||
systemPreferences.isDarkMode = deprecate.moveAPI(
|
||||
systemPreferences.isDarkMode,
|
||||
'systemPreferences.isDarkMode()',
|
||||
'nativeTheme.shouldUseDarkColors'
|
||||
);
|
||||
systemPreferences.isInvertedColorScheme = deprecate.moveAPI(
|
||||
systemPreferences.isInvertedColorScheme,
|
||||
'systemPreferences.isInvertedColorScheme()',
|
||||
'nativeTheme.shouldUseInvertedColorScheme'
|
||||
);
|
||||
systemPreferences.isHighContrastColorScheme = deprecate.moveAPI(
|
||||
systemPreferences.isHighContrastColorScheme,
|
||||
'systemPreferences.isHighContrastColorScheme()',
|
||||
'nativeTheme.shouldUseHighContrastColors'
|
||||
);
|
||||
|
||||
export default systemPreferences;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue