This commit is contained in:
crusader 2018-09-18 22:33:02 +09:00
parent cd7ed362e2
commit c2496106dc
2 changed files with 25 additions and 2 deletions

View File

@ -15,8 +15,8 @@ export class AppComponent implements OnInit {
private electronProxyService: ElectronProxyService,
private probeService: ProbeService,
) {
this.showTitleBar = !__LINUX__;
// this.showTitleBar = true;
// this.showTitleBar = !__LINUX__;
this.showTitleBar = true;
}
ngOnInit(): void {

View File

@ -93,6 +93,29 @@ export class AppWindow {
}
});
}
if (__WIN32__) {
// workaround for known issue with fullscreen-ing the app and restoring
// is that some Chromium API reports the incorrect bounds, so that it
// will leave a small space at the top of the screen on every other
// maximize
//
// adapted from https://github.com/electron/electron/issues/12971#issuecomment-403956396
//
// can be tidied up once https://github.com/electron/electron/issues/12971
// has been confirmed as resolved
this.window.once('ready-to-show', () => {
this.window.on('unmaximize', () => {
setTimeout(() => {
const bounds = this.window.getBounds();
bounds.width += 1;
this.window.setBounds(bounds);
bounds.width -= 1;
this.window.setBounds(bounds);
}, 5);
});
});
}
}
public load() {