From 2156bdbce33c7d004308279a44100b915401e5e0 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Wed, 21 Jun 2017 20:35:01 +0200 Subject: [PATCH] theme: apply theme's bg color to electron window --- app/main/electron-window.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/main/electron-window.js b/app/main/electron-window.js index 0e09b1ab..7e0caa5c 100644 --- a/app/main/electron-window.js +++ b/app/main/electron-window.js @@ -3,6 +3,10 @@ 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 @@ -11,7 +15,7 @@ module.exports = function(options={}) { width: options.width || 800, height: options.height || 600, title: options.title || settings.read('appName'), - backgroundColor:'#191f2a', + backgroundColor: bgColor, type:options.type })