From 81a9e5e0283ee6a7a92bb2c5cea74898f83b5e23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20Vay=C3=A1?= Date: Fri, 27 Dec 2019 10:47:12 +0100 Subject: [PATCH] set white background for OSs which have turned off subpixel aliasing (#1129) --- src/main.js | 1 + src/main/autoUpdater.js | 1 + src/main/mainWindow.js | 1 + 3 files changed, 3 insertions(+) diff --git a/src/main.js b/src/main.js index 97aad610..316d9a07 100644 --- a/src/main.js +++ b/src/main.js @@ -442,6 +442,7 @@ function handleAppWebContentsCreated(dc, contents) { } if (!popupWindow) { popupWindow = new BrowserWindow({ + backgroundColor: '#fff', // prevents blurry text: https://electronjs.org/docs/faq#the-font-looks-blurry-what-is-this-and-what-can-i-do parent: mainWindow, show: false, webPreferences: { diff --git a/src/main/autoUpdater.js b/src/main/autoUpdater.js index 9f68030e..7b9e2ae0 100644 --- a/src/main/autoUpdater.js +++ b/src/main/autoUpdater.js @@ -39,6 +39,7 @@ function createUpdaterModal(parentWindow, options) { height: windowHeight, resizable: false, autoHideMenuBar: true, + backgroundColor: '#fff', // prevents blurry text: https://electronjs.org/docs/faq#the-font-looks-blurry-what-is-this-and-what-can-i-do }; if (process.platform === 'linux') { windowOptions.icon = options.linuxAppIcon; diff --git a/src/main/mainWindow.js b/src/main/mainWindow.js index 890835ca..39675b09 100644 --- a/src/main/mainWindow.js +++ b/src/main/mainWindow.js @@ -52,6 +52,7 @@ function createMainWindow(config, options) { minWidth: minimumWindowWidth, minHeight: minimumWindowHeight, fullscreen: false, + backgroundColor: '#fff', // prevents blurry text: https://electronjs.org/docs/faq#the-font-looks-blurry-what-is-this-and-what-can-i-do webPreferences: { nodeIntegration: true, contextIsolation: false,