@@ -8,7 +8,7 @@ import { IWindowsMainService, ICodeWindow } from 'vs/platform/windows/electron-m
88import { MessageBoxOptions , MessageBoxReturnValue , shell , OpenDevToolsOptions , SaveDialogOptions , SaveDialogReturnValue , OpenDialogOptions , OpenDialogReturnValue , Menu , BrowserWindow , app , clipboard , powerMonitor , nativeTheme } from 'electron' ;
99import { OpenContext } from 'vs/platform/windows/node/window' ;
1010import { ILifecycleMainService } from 'vs/platform/lifecycle/electron-main/lifecycleMainService' ;
11- import { IOpenedWindow , IOpenWindowOptions , IWindowOpenable , IOpenEmptyWindowOptions } from 'vs/platform/windows/common/windows' ;
11+ import { IOpenedWindow , IOpenWindowOptions , IWindowOpenable , IOpenEmptyWindowOptions , IColorScheme } from 'vs/platform/windows/common/windows' ;
1212import { INativeOpenDialogOptions } from 'vs/platform/dialogs/common/dialogs' ;
1313import { isMacintosh , isWindows , isRootUser , isLinux } from 'vs/base/common/platform' ;
1414import { ICommonNativeHostService , IOSProperties , IOSStatistics } from 'vs/platform/native/common/native' ;
@@ -22,7 +22,6 @@ import { ITelemetryData, ITelemetryService } from 'vs/platform/telemetry/common/
2222import { createDecorator } from 'vs/platform/instantiation/common/instantiation' ;
2323import { MouseInputEvent } from 'vs/base/parts/sandbox/common/electronTypes' ;
2424import { arch , totalmem , release , platform , type , loadavg , freemem , cpus } from 'os' ;
25- import { ColorScheme } from 'vs/platform/theme/common/theme' ;
2625import { virtualMachineHint } from 'vs/base/node/id' ;
2726import { ILogService } from 'vs/platform/log/common/log' ;
2827import { dirname , join } from 'vs/base/common/path' ;
@@ -52,16 +51,10 @@ export class NativeHostMainService implements INativeHostMainService {
5251
5352 // Color Scheme changes
5453 nativeTheme . on ( 'updated' , ( ) => {
55- let colorScheme : ColorScheme ;
56- if ( nativeTheme . shouldUseInvertedColorScheme || nativeTheme . shouldUseHighContrastColors ) {
57- colorScheme = ColorScheme . HIGH_CONTRAST ;
58- } else if ( nativeTheme . shouldUseDarkColors ) {
59- colorScheme = ColorScheme . DARK ;
60- } else {
61- colorScheme = ColorScheme . LIGHT ;
62- }
63-
64- this . _onColorSchemeChange . fire ( colorScheme ) ;
54+ this . _onColorSchemeChange . fire ( {
55+ highContrast : nativeTheme . shouldUseInvertedColorScheme || nativeTheme . shouldUseHighContrastColors ,
56+ dark : nativeTheme . shouldUseDarkColors
57+ } ) ;
6558 } ) ;
6659 }
6760
@@ -87,7 +80,7 @@ export class NativeHostMainService implements INativeHostMainService {
8780
8881 readonly onOSResume = Event . fromNodeEventEmitter ( powerMonitor , 'resume' ) ;
8982
90- private readonly _onColorSchemeChange = new Emitter < ColorScheme > ( ) ;
83+ private readonly _onColorSchemeChange = new Emitter < IColorScheme > ( ) ;
9184 readonly onColorSchemeChange = this . _onColorSchemeChange . event ;
9285
9386 //#endregion
0 commit comments