pass in default width/height of window

This commit is contained in:
Kyle Spearrin 2018-05-04 15:57:54 -04:00
parent 2032e14285
commit 36dfdf24f1
1 changed files with 3 additions and 2 deletions

View File

@ -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<any> {
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({