reconfigure terminals on DPI change (fixes #576)

This commit is contained in:
Eugene Pankov
2019-02-10 00:23:49 +01:00
parent 100436f511
commit 329d0448d3
4 changed files with 16 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
import { app, ipcMain, Menu, Tray, shell } from 'electron'
import * as electron from 'electron'
import { loadConfig } from './config'
import { Window, WindowOptions } from './window'
@@ -21,6 +22,10 @@ export class Application {
app.commandLine.appendSwitch('lang', 'EN')
}
init () {
electron.screen.on('display-metrics-changed', () => this.broadcast('host:display-metrics-changed'))
}
async newWindow (options?: WindowOptions): Promise<Window> {
let window = new Window(options)
this.windows.push(window)

View File

@@ -58,5 +58,6 @@ app.on('ready', () => {
}
]))
}
application.init()
application.newWindow({ hidden: argv.hidden })
})