Add zooming functionality (#140)

This commit is contained in:
Gelaechter 2023-06-11 19:45:13 +00:00 committed by GitHub
parent 72099cb1fe
commit d7ca25525c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 74 additions and 4 deletions

View file

@ -1,4 +1,4 @@
import { ipcRenderer } from 'electron';
import { ipcRenderer, webFrame } from 'electron';
import Store from 'electron-store';
const store = new Store();
@ -23,10 +23,15 @@ const disableMediaKeys = () => {
ipcRenderer.send('global-media-keys-disable');
};
const setZoomFactor = (zoomFactor: number) => {
webFrame.setZoomFactor(zoomFactor / 100);
};
export const localSettings = {
disableMediaKeys,
enableMediaKeys,
get,
restart,
set,
setZoomFactor,
};