mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 00:56:02 +00:00
remember fullscreen state #230
This commit is contained in:
@@ -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'
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -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',
|
||||||
|
|||||||
Reference in New Issue
Block a user