less sync ipc

This commit is contained in:
Eugene Pankov
2021-09-25 18:11:35 +02:00
parent 1852486818
commit e3e01558b2
3 changed files with 31 additions and 7 deletions

View File

@@ -398,6 +398,18 @@ export class Window {
}
this.window.on('move', onBoundsChange)
this.window.on('resize', onBoundsChange)
ipcMain.on('window-set-traffic-light-position', (_event, x, y) => {
this.window.setTrafficLightPosition({ x, y })
})
ipcMain.on('window-set-opacity', (_event, opacity) => {
this.window.setOpacity(opacity)
})
ipcMain.on('window-set-progress-bar', (_event, value) => {
this.window.setProgressBar(value, { mode: value < 0 ? 'none' : 'normal' })
})
}
private destroy () {