theme: apply theme's bg color to electron window
This commit is contained in:
parent
1f865544d8
commit
2156bdbce3
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue