Injectable BrowserWindow constructor in AtomWindow

This commit is contained in:
Ash Wilson 2019-04-18 16:18:32 -04:00
parent 45770f1fe6
commit 0b0d3485ae
No known key found for this signature in database
GPG Key ID: 81B1DDB704F69D2A

View File

@ -50,7 +50,9 @@ class AtomWindow extends EventEmitter {
if (this.shouldAddCustomTitleBar()) options.titleBarStyle = 'hidden'
if (this.shouldAddCustomInsetTitleBar()) options.titleBarStyle = 'hiddenInset'
if (this.shouldHideTitleBar()) options.frame = false
this.browserWindow = new BrowserWindow(options)
const BrowserWindowConstructor = settings.browserWindowConstructor || BrowserWindow
this.browserWindow = new BrowserWindowConstructor(options)
Object.defineProperty(this.browserWindow, 'loadSettingsJSON', {
get: () => JSON.stringify(Object.assign({