mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-28 09:51:06 -06:00
SDA-3422 - Workaround for the main view container height resize issue (#1289)
This commit is contained in:
parent
19178b6878
commit
54ba4598b9
@ -1179,6 +1179,27 @@ export const loadBrowserViews = async (
|
||||
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,
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
windowHandler.setMainView(mainView);
|
||||
windowHandler.setTitleBarView(mainView);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user