Hopefully enable subpixel font rendering

https://github.com/vector-im/riot-web/issues/12443 points out the
electron eccentricity that the background of a BrowserWindow is
'transparent' (whatever that actually means in practice) by default
which causes subpixel font rendering to be disabled. Set an explicit
background colour as per the faq entry.

Fixes https://github.com/vector-im/riot-web/issues/12443
This commit is contained in:
David Baker 2020-02-21 11:17:18 +00:00
parent 0ec93e296f
commit 0577abd885

View file

@ -592,6 +592,9 @@ app.on('ready', async () => {
const preloadScript = path.normalize(`${__dirname}/preload.js`);
mainWindow = global.mainWindow = new BrowserWindow({
// https://www.electronjs.org/docs/faq#the-font-looks-blurry-what-is-this-and-what-can-i-do
backgroundColor: '#fff',
icon: iconPath,
show: false,
autoHideMenuBar: store.get('autoHideMenuBar', true),