mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-28 09:51:06 -06:00
SDA-3784 Window resizing optim
This commit is contained in:
parent
bc449c3fe7
commit
4530c2aca9
@ -1365,31 +1365,8 @@ export const loadBrowserViews = async (
|
||||
y: TITLE_BAR_HEIGHT,
|
||||
});
|
||||
mainView.setAutoResize({
|
||||
horizontal: true,
|
||||
vertical: false,
|
||||
width: true,
|
||||
height: false,
|
||||
});
|
||||
|
||||
// Workaround to fix the auto resize of the main view container height
|
||||
mainWindow.on('resize', () => {
|
||||
if (
|
||||
!mainView ||
|
||||
mainView.webContents.isDestroyed() ||
|
||||
!mainWindow ||
|
||||
!windowExists(mainWindow)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
const bounds = mainView.getBounds();
|
||||
const [, height] = mainWindow.getSize();
|
||||
mainView.setBounds({
|
||||
...bounds,
|
||||
...{
|
||||
y: mainWindow.isFullScreen() ? 0 : TITLE_BAR_HEIGHT,
|
||||
height: mainWindow.isFullScreen() ? height : height - TITLE_BAR_HEIGHT,
|
||||
},
|
||||
});
|
||||
height: true,
|
||||
});
|
||||
|
||||
windowHandler.setMainView(mainView);
|
||||
|
Loading…
Reference in New Issue
Block a user