This commit is contained in:
Eugene Pankov
2017-06-24 14:14:57 +02:00
parent b5486b2ac9
commit fa6f968e87
8 changed files with 22 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
import { Injectable } from '@angular/core'
import { ConfigService } from '../services/config.service'
import { ElectronService } from '../services/electron.service'
import { HostAppService } from '../services/hostApp.service'
import { HostAppService, Bounds } from '../services/hostApp.service'
export interface IScreen {
id: string
@@ -24,7 +24,7 @@ export class DockingService {
}
let dockSide = this.config.store.appearance.dock
let newBounds: Electron.Rectangle = { x: 0, y: 0, width: 0, height: 0 }
let newBounds: Bounds = { x: 0, y: 0, width: 0, height: 0 }
let fill = this.config.store.appearance.dockFill
if (dockSide === 'off') {

View File

@@ -6,6 +6,13 @@ export enum Platform {
Linux, macOS, Windows,
}
export interface Bounds {
x: number
y: number
width: number
height: number
}
@Injectable()
export class HostAppService {
platform: Platform
@@ -97,7 +104,7 @@ export class HostAppService {
this.electron.ipcRenderer.send('window-toggle-maximize')
}
setBounds (bounds: Electron.Rectangle) {
setBounds (bounds: Bounds) {
this.electron.ipcRenderer.send('window-set-bounds', bounds)
}