mirror of
https://github.com/finos/SymphonyElectron.git
synced 2026-10-25 06:17:38 -05:00
SDA-3784 Window resizing optim
This commit is contained in:
1 parent
bc449c3fe7
commit
4530c2aca9
1 file changed
+1
-24
+1
-24
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user