faster tab creation

This commit is contained in:
Eugene Pankov
2018-09-20 12:46:50 +02:00
parent 6fa5ab5eb2
commit 6bc2d18f3c
4 changed files with 17 additions and 7 deletions

View File

@@ -155,6 +155,14 @@ export class HostAppService {
this.electron.ipcRenderer.send('window-set-title', title)
}
setTouchBar (touchBar: Electron.TouchBar) {
this.getWindow().setTouchBar(touchBar)
}
popupContextMenu (menuDefinition: Electron.MenuItemConstructorOptions[]) {
this.electron.ipcRenderer.send('window-popup-context-menu', menuDefinition)
}
broadcastConfigChange () {
this.electron.ipcRenderer.send('app:config-change')
}

View File

@@ -54,7 +54,7 @@ export class TouchbarService {
...buttons.map(button => this.getButton(button))
]
})
this.hostApp.getWindow().setTouchBar(touchBar)
this.hostApp.setTouchBar(touchBar)
}
private getButton (button: IToolbarButton): Electron.TouchBarButton {