mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-20 02:18:01 +00:00
reconfigure terminals on DPI change (fixes #576)
This commit is contained in:
@@ -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)
|
||||
|
@@ -58,5 +58,6 @@ app.on('ready', () => {
|
||||
}
|
||||
]))
|
||||
}
|
||||
application.init()
|
||||
application.newWindow({ hidden: argv.hidden })
|
||||
})
|
||||
|
Reference in New Issue
Block a user