diff --git a/src/browser/settings.jsx b/src/browser/settings.jsx index 1237c61e..c74688d1 100644 --- a/src/browser/settings.jsx +++ b/src/browser/settings.jsx @@ -40,6 +40,7 @@ var SettingsPage = React.createClass({ teams: this.state.teams, hideMenuBar: this.state.hideMenuBar, showTrayIcon: this.state.showTrayIcon, + trayIconTheme: this.state.trayIconTheme, disablewebsecurity: this.state.disablewebsecurity, version: settings.version }; @@ -69,6 +70,11 @@ var SettingsPage = React.createClass({ showTrayIcon: this.refs.showTrayIcon.getChecked() }); }, + handleChangeTrayIconTheme: function() { + this.setState({ + trayIconTheme: this.refs.trayIconTheme.getValue() + }); + }, render: function() { var teams_row = ( @@ -84,10 +90,16 @@ var SettingsPage = React.createClass({ options.push(); } - if (process.platform === 'darwin') { + if (process.platform === 'darwin' || process.platform === 'linux') { options.push(); } + if (process.platform === 'linux') { + options.push( + + + ); + } options.push(); var options_row = (options.length > 0) ? ( diff --git a/src/common/settings.js b/src/common/settings.js index 14dcdee0..fc5afa4e 100644 --- a/src/common/settings.js +++ b/src/common/settings.js @@ -24,6 +24,7 @@ var loadDefault = function(version) { teams: [], hideMenuBar: false, showTrayIcon: false, + trayIconTheme: '', disablewebsecurity: false, version: 1 }; diff --git a/src/main.js b/src/main.js index 608318b4..bce357db 100644 --- a/src/main.js +++ b/src/main.js @@ -64,7 +64,7 @@ const trayImages = function() { mention: nativeImage.createFromPath(path.resolve(__dirname, 'resources/osx/MenuIconMentionTemplate.png')) }; case 'linux': - var resourcesDir = 'resources/linux/' + (config.trayIconTheme||'light') + '/'; + var resourcesDir = 'resources/linux/' + (config.trayIconTheme || 'light') + '/'; return { normal: nativeImage.createFromPath(path.resolve(__dirname, resourcesDir + 'MenuIconTemplate.png')), unread: nativeImage.createFromPath(path.resolve(__dirname, resourcesDir + 'MenuIconUnreadTemplate.png')),