diff --git a/package.json b/package.json index fec74e5453b..502a7392065 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "electron-builder": "5.2.1", "electron-connect": "^0.3.7", "electron-packager": "^7.0.1", - "electron-prebuilt": "1.2.6", + "electron-prebuilt": "1.3.3", "electron-winstaller": "^2.2.0", "esformatter": "^0.9.3", "esformatter-jsx": "^5.0.0", diff --git a/src/browser/index.jsx b/src/browser/index.jsx index 364713ee439..633698fef53 100644 --- a/src/browser/index.jsx +++ b/src/browser/index.jsx @@ -352,9 +352,6 @@ var MattermostView = React.createClass({ webview.addEventListener("dom-ready", function() { // webview.openDevTools(); - // In order to apply the zoom level to webview. - webFrame.setZoomLevel(parseInt(localStorage.getItem('zoomLevel'))); - // Use 'Meiryo UI' and 'MS Gothic' to prevent CJK fonts on Windows(JP). if (process.platform === 'win32') { var applyCssFile = function(cssFile) { @@ -548,22 +545,6 @@ var showUnreadBadge = function(unreadCount, mentionCount) { } } -if (!localStorage.getItem('zoomLevel')) { - localStorage.setItem('zoomLevel', 0); -} -webFrame.setZoomLevel(parseInt(localStorage.getItem('zoomLevel'))); - -ipcRenderer.on('zoom-in', (event, increment) => { - const zoomLevel = webFrame.getZoomLevel() + increment - webFrame.setZoomLevel(zoomLevel); - localStorage.setItem('zoomLevel', zoomLevel); -}); - -ipcRenderer.on('zoom-reset', (event) => { - webFrame.setZoomLevel(0); - localStorage.setItem('zoomLevel', 0); -}); - ReactDOM.render( , document.getElementById('content') diff --git a/src/main/menus/app.js b/src/main/menus/app.js index e5fd6432aa3..f9d5c9142aa 100644 --- a/src/main/menus/app.js +++ b/src/main/menus/app.js @@ -138,23 +138,11 @@ var createTemplate = function(mainWindow, config) { } } }, separatorItem, { - label: 'Actual Size', - accelerator: 'CmdOrCtrl+0', - click: () => { - mainWindow.webContents.send('zoom-reset'); - } + role: 'resetzoom' }, { - label: 'Zoom In', - accelerator: 'CmdOrCtrl+Plus', - click: () => { - mainWindow.webContents.send('zoom-in', 1); - } + role: 'zoomin' }, { - label: 'Zoom Out', - accelerator: 'CmdOrCtrl+-', - click: () => { - mainWindow.webContents.send('zoom-in', -1); - } + role: 'zoomout' }, separatorItem, { label: 'Toggle Developer Tools', accelerator: (function() {