diff --git a/src/components/ContainerHome.react.js b/src/components/ContainerHome.react.js index dad139c8..dbf5e305 100644 --- a/src/components/ContainerHome.react.js +++ b/src/components/ContainerHome.react.js @@ -102,7 +102,7 @@ var ContainerHome = React.createClass({ } } else { var logWidget = ( - + ); var webWidget; if (this.showWeb()) { diff --git a/src/menutemplate.js b/src/menutemplate.js index c6d3b79b..cc227efc 100644 --- a/src/menutemplate.js +++ b/src/menutemplate.js @@ -135,6 +135,20 @@ var MenuTemplate = function () { label: 'Toggle Chromium Developer Tools', accelerator: 'Alt+' + util.CommandOrCtrl() + '+I', click: function() { remote.getCurrentWindow().toggleDevTools(); } + }, + { + label: 'Log Zoom In', + accelerator: util.CommandOrCtrl() + '+=', + click: function() { + util.adjustLogFontSize(2); + } + }, + { + label: 'Log Zoom Out', + accelerator: util.CommandOrCtrl() + '+-', + click: function() { + util.adjustLogFontSize(-2); + } } ] }, diff --git a/src/utils/Util.js b/src/utils/Util.js index 590e9c27..1d61a21d 100644 --- a/src/utils/Util.js +++ b/src/utils/Util.js @@ -1,3 +1,4 @@ +import $ from 'jquery'; import child_process from 'child_process'; import Promise from 'bluebird'; import fs from 'fs'; @@ -55,6 +56,14 @@ module.exports = { escapePath: function (str) { return str.replace(/ /g, '\\ ').replace(/\(/g, '\\(').replace(/\)/g, '\\)'); }, + getLogFontSize: function() { + return parseInt($('.logs').css('font-size')); + }, + adjustLogFontSize: function(offset) { + var fontSize = this.getLogFontSize(); + var newFontSize = (fontSize + offset) > 0 ? (fontSize + offset) : 1; + $('.logs').css('font-size', newFontSize); + }, home: function () { return app.getPath('home'); },