mirror of
https://github.com/usebruno/bruno.git
synced 2024-11-21 23:43:15 +01:00
feat: add global shortcut for zooming in the Electron app
This commit is contained in:
parent
40001949b8
commit
48b0c1b731
@ -11,7 +11,7 @@ if (isDev) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const { format } = require('url');
|
const { format } = require('url');
|
||||||
const { BrowserWindow, app, Menu, ipcMain } = require('electron');
|
const { BrowserWindow, app, Menu, ipcMain, globalShortcut } = require('electron');
|
||||||
const { setContentSecurityPolicy } = require('electron-util');
|
const { setContentSecurityPolicy } = require('electron-util');
|
||||||
|
|
||||||
const menuTemplate = require('./app/menu-template');
|
const menuTemplate = require('./app/menu-template');
|
||||||
@ -141,6 +141,11 @@ app.on('ready', async () => {
|
|||||||
}
|
}
|
||||||
return { action: 'deny' };
|
return { action: 'deny' };
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Quick fix for Electron issue #29996: https://github.com/electron/electron/issues/29996
|
||||||
|
globalShortcut.register('Ctrl+=', () => {
|
||||||
|
mainWindow.webContents.setZoomLevel(mainWindow.webContents.getZoomLevel() + 1);
|
||||||
|
});
|
||||||
|
|
||||||
// register all ipc handlers
|
// register all ipc handlers
|
||||||
registerNetworkIpc(mainWindow);
|
registerNetworkIpc(mainWindow);
|
||||||
|
Loading…
Reference in New Issue
Block a user