From 36dfdf24f146062447d2b8884fbf84981ecff664 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 4 May 2018 15:57:54 -0400 Subject: [PATCH] pass in default width/height of window --- src/electron/window.main.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/electron/window.main.ts b/src/electron/window.main.ts index 87f9fed6fc..5c462eeb2f 100644 --- a/src/electron/window.main.ts +++ b/src/electron/window.main.ts @@ -17,7 +17,7 @@ export class WindowMain { private windowStateChangeTimer: NodeJS.Timer; private windowStates: { [key: string]: any; } = {}; - constructor(private storageService: StorageService) { } + constructor(private storageService: StorageService, private defaultWidth = 950, private defaultHeight: 600) { } init(): Promise { return new Promise((resolve, reject) => { @@ -73,7 +73,8 @@ export class WindowMain { } private async createWindow() { - this.windowStates[Keys.mainWindowSize] = await this.getWindowState(Keys.mainWindowSize, 950, 600); + this.windowStates[Keys.mainWindowSize] = await this.getWindowState(Keys.mainWindowSize, this.defaultWidth, + this.defaultHeight); // Create the browser window. this.win = new BrowserWindow({