提交 f647df6e 编写于 作者: B Benjamin Pasero

electron - allow to configure color profile for #88491

上级 8999159f
......@@ -131,8 +131,12 @@ function configureCommandlineSwitchesSync(cliArgs) {
'disable-hardware-acceleration',
// provided by Electron
'disable-color-correct-rendering'
'disable-color-correct-rendering',
// override for the color profile to use
'force-color-profile'
];
if (process.platform === 'linux') {
SUPPORTED_ELECTRON_SWITCHES.push('force-renderer-accessibility');
}
......@@ -147,7 +151,16 @@ function configureCommandlineSwitchesSync(cliArgs) {
}
const argvValue = argvConfig[argvKey];
if (argvValue === true || argvValue === 'true') {
// Color profile
if (argvKey === 'force-color-profile') {
if (argvValue) {
app.commandLine.appendSwitch(argvKey, argvValue);
}
}
// Others
else if (argvValue === true || argvValue === 'true') {
if (argvKey === 'disable-hardware-acceleration') {
app.disableHardwareAcceleration(); // needs to be called explicitly
} else {
......
......@@ -341,6 +341,10 @@ import { IJSONSchema } from 'vs/base/common/jsonSchema';
'disable-color-correct-rendering': {
type: 'boolean',
description: nls.localize('argv.disableColorCorrectRendering', 'Resolves issues around color profile selection. ONLY change this option if you encounter graphic issues.')
},
'force-color-profile': {
type: 'string',
markdownDescription: nls.localize('argv.forceColorProfile', 'Allows to override the color profile to use. If you experience colors appear badly, try to set this to `srgb` and restart.')
}
}
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册