electron: Fix app not rendering colors properly.

There is a bug in v2 of electron which causes
pale colors. Resetting the color profile to srgb
fixes this problem. This is a temporary solution
until electron officially fixes this.

More info - https://github.com/electron/electron/issues/10732.

Fixes: #497.
This commit is contained in:
Akash Nimare
2018-05-23 11:10:20 +05:30
parent 0e3c6bceeb
commit deed18d75f

View File

@@ -131,6 +131,9 @@ function createMainWindow() {
// Decrease load on GPU (experimental)
app.disableHardwareAcceleration();
// Temporary fix for Electron render colors differently
app.commandLine.appendSwitch('force-color-profile', 'srgb');
// eslint-disable-next-line max-params
app.on('certificate-error', (event, webContents, url, error, certificate, callback) => {
event.preventDefault();