zoom - removed from settings, added to window menu

This commit is contained in:
Jan Prochazka
2022-02-24 17:05:19 +01:00
parent 1afbf6049e
commit f384ddfb1f
6 changed files with 42 additions and 27 deletions

View File

@@ -387,7 +387,6 @@ registerCommand({
const keys = [
'leftPanelWidth',
'visibleToolbar',
'zoomKoef',
'selectedWidget',
'currentTheme',
@@ -643,6 +642,33 @@ registerCommand({
onClick: () => openWebLink('https://opencollective.com/dbgate'),
});
registerCommand({
id: 'app.zoomIn',
category: 'Application',
name: 'Zoom in',
keyText: 'Ctrl+=',
testEnabled: () => getElectron() != null,
onClick: () => getElectron().send('window-action', 'zoomin'),
});
registerCommand({
id: 'app.zoomOut',
category: 'Application',
name: 'Zoom out',
keyText: 'Ctrl+-',
testEnabled: () => getElectron() != null,
onClick: () => getElectron().send('window-action', 'zoomout'),
});
registerCommand({
id: 'app.zoomReset',
category: 'Application',
name: 'Reset zoom',
testEnabled: () => getElectron() != null,
onClick: () => getElectron().send('window-action', 'zoomreset'),
});
const electron = getElectron();
if (electron) {
electron.addEventListener('run-command', (e, commandId) => runCommand(commandId));