diff --git a/app/Application.js b/app/Application.js index 86408a8c..13696712 100644 --- a/app/Application.js +++ b/app/Application.js @@ -128,6 +128,22 @@ Ext.define('Rambox.Application', { ] }); + // Mouse Wheel zooming + document.addEventListener('mousewheel', function(e) { + if( e.ctrlKey ) { + var delta = Math.max(-1, Math.min(1, (e.wheelDelta || -e.detail))); + + var tabPanel = Ext.cq1('app-main'); + if ( tabPanel.items.indexOf(tabPanel.getActiveTab()) === 0 ) return false; + + if ( delta === 1 ) { // Zoom In + tabPanel.getActiveTab().zoomIn(); + } else { // Zoom Out + tabPanel.getActiveTab().zoomOut(); + } + } + }); + if ( process.platform !== 'win32' ) { this.checkUpdate(true); }