main: fix themed gui bg color

This commit is contained in:
jean-emmanuel 2018-03-03 15:19:44 +01:00
parent 4954295992
commit 1cfd615c85

View file

@ -3,14 +3,16 @@ var path = require('path'),
shortcut = require('electron-localshortcut'),
settings = require('./settings')
var bgColor = settings.read('theme') && settings.read('theme').indexOf('--color-bg:') != -1 ?
settings.read('theme').match(/--color-bg:([^;]*);/)[1].trim()
: '#191f2a'
module.exports = function(options={}) {
var window
var theme = settings.read('theme'),
bgColor = theme && theme.join('\n').indexOf('--color-bg:') != -1 ?
theme.join('\n').match(/--color-bg:([^;]*);/)[1].trim()
: '#191f2a'
window = new BrowserWindow({
width: options.width || 800,
height: options.height || 600,