remember fullscreen state #230

This commit is contained in:
Jan Prochazka
2022-02-24 17:54:20 +01:00
parent db7370aef6
commit e23b5b4124
2 changed files with 5 additions and 1 deletions

View File

@@ -183,6 +183,9 @@ function createWindow() {
if (initialConfig['winIsMaximized']) { if (initialConfig['winIsMaximized']) {
mainWindow.maximize(); mainWindow.maximize();
} }
if (initialConfig['winIsFullscreen']) {
mainWindow.setFullScreen(true);
}
mainMenu = buildMenu(); mainMenu = buildMenu();
mainWindow.setMenu(mainMenu); mainWindow.setMenu(mainMenu);
@@ -203,6 +206,7 @@ function createWindow() {
winBounds: mainWindow.getBounds(), winBounds: mainWindow.getBounds(),
winIsMaximized: mainWindow.isMaximized(), winIsMaximized: mainWindow.isMaximized(),
useNativeMenu: useNativeMenuSpecified, useNativeMenu: useNativeMenuSpecified,
winIsFullscreen: mainWindow.isFullScreen(),
}), }),
'utf-8' 'utf-8'
); );

View File

@@ -594,6 +594,7 @@ registerCommand({
id: 'app.toggleFullScreen', id: 'app.toggleFullScreen',
category: 'Application', category: 'Application',
name: 'Toggle full screen', name: 'Toggle full screen',
keyText: 'F11',
testEnabled: () => getElectron() != null, testEnabled: () => getElectron() != null,
onClick: () => getElectron().send('window-action', 'fullscreen'), onClick: () => getElectron().send('window-action', 'fullscreen'),
}); });
@@ -642,7 +643,6 @@ registerCommand({
onClick: () => openWebLink('https://opencollective.com/dbgate'), onClick: () => openWebLink('https://opencollective.com/dbgate'),
}); });
registerCommand({ registerCommand({
id: 'app.zoomIn', id: 'app.zoomIn',
category: 'Application', category: 'Application',