Skip to content

Commit

Permalink
Merge pull request #564 from jijojosephk/issue-560
Browse files Browse the repository at this point in the history
Fix: #560
  • Loading branch information
jijojosephk authored Sep 5, 2022
2 parents c3dac3f + 26262c8 commit 9ac7c32
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions app/browser/zoom.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const { webFrame, ipcRenderer } = require('electron');

const zoomLevels = {
'+': 1,
'-': -1,
'+': 0.25,
'-': -0.25,
'0': 0
};

Expand All @@ -20,8 +20,15 @@ exports = module.exports = (config) => {
setNextZoomLevel(keyName, config);
}
}, false);
require('@electron/remote').getCurrentWindow().webContents.on('zoom-changed',setZoomChangedHandler(config));
};

function setZoomChangedHandler(config) {
return (event, zoomDirection) => {
setNextZoomLevel(zoomDirection == 'in' ? '+' : '-', config);
};
}

function restoreZoomLevel(config) {
ipcRenderer.invoke('getZoomLevel', config.partition).then(zoomLevel => {
webFrame.setZoomLevel(zoomLevel);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "teams-for-linux",
"version": "1.0.31",
"version": "1.0.32",
"main": "app/index.js",
"description": "Unofficial client for Microsoft Teams for Linux",
"homepage": "https://github.com/IsmaelMartinez/teams-for-linux",
Expand Down

0 comments on commit 9ac7c32

Please sign in to comment.