mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-11-26 02:40:24 -06:00
SDA-3475 - Remove assigning window size to config (#1303)
This commit is contained in:
parent
830f0d3676
commit
bf2f43da93
@ -300,6 +300,12 @@ export class WindowHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
// set window opts with additional config
|
||||
this.mainWindow = new BrowserWindow({
|
||||
...this.windowOpts,
|
||||
...getBounds(this.config.mainWinPos, DEFAULT_WIDTH, DEFAULT_HEIGHT),
|
||||
}) as ICustomBrowserWindow;
|
||||
|
||||
logger.info('window-handler: windowSize: ' + JSON.stringify(windowSize));
|
||||
if (windowSize) {
|
||||
const args = windowSize.split('=');
|
||||
@ -308,23 +314,11 @@ export class WindowHandler {
|
||||
logger.info(
|
||||
'window-handler: windowSize: sizes: ' + JSON.stringify(sizes),
|
||||
);
|
||||
if (this.config.mainWinPos) {
|
||||
this.config.mainWinPos.width = Number(sizes[0]);
|
||||
this.config.mainWinPos.height = Number(sizes[1]);
|
||||
} else {
|
||||
this.config.mainWinPos = {
|
||||
width: Number(sizes[0]),
|
||||
height: Number(sizes[1]),
|
||||
};
|
||||
if (this.mainWindow && windowExists(this.mainWindow)) {
|
||||
this.mainWindow.setSize(Number(sizes[0]), Number(sizes[1]));
|
||||
}
|
||||
}
|
||||
|
||||
// set window opts with additional config
|
||||
this.mainWindow = new BrowserWindow({
|
||||
...this.windowOpts,
|
||||
...getBounds(this.config.mainWinPos, DEFAULT_WIDTH, DEFAULT_HEIGHT),
|
||||
}) as ICustomBrowserWindow;
|
||||
|
||||
// Hide electron's default menu bar for Windows
|
||||
if (isWindowsOS && this.mainWindow && windowExists(this.mainWindow)) {
|
||||
this.mainWindow.setMenuBarVisibility(false);
|
||||
|
Loading…
Reference in New Issue
Block a user