From b8244f3266e9c84118de7486a6c277855a2e039b Mon Sep 17 00:00:00 2001 From: Devin Binnie <52460000+devinbinnie@users.noreply.github.com> Date: Thu, 14 Apr 2022 10:15:21 -0400 Subject: [PATCH] [MM-26016] Hide tray icon theme colour when tray icon not enabled (#2051) --- src/renderer/components/SettingsPage.tsx | 88 ++++++++++++------------ 1 file changed, 45 insertions(+), 43 deletions(-) diff --git a/src/renderer/components/SettingsPage.tsx b/src/renderer/components/SettingsPage.tsx index 09d07f50..5f9147ac 100644 --- a/src/renderer/components/SettingsPage.tsx +++ b/src/renderer/components/SettingsPage.tsx @@ -712,49 +712,51 @@ export default class SettingsPage extends React.PureComponent); } - if (window.process.platform === 'linux' || window.process.platform === 'win32') { - options.push( - - {'Icon theme: '} - {window.process.platform === 'win32' && - <> - this.handleChangeTrayIconTheme('use_system')} - label={'Use system default'} - /> - {' '} - - } - this.handleChangeTrayIconTheme('light')} - label={'Light'} - /> - {' '} - this.handleChangeTrayIconTheme('dark')} - label={'Dark'} - /> - , - ); + if (this.state.showTrayIcon) { + if (window.process.platform === 'linux' || window.process.platform === 'win32') { + options.push( + + {'Icon theme: '} + {window.process.platform === 'win32' && + <> + this.handleChangeTrayIconTheme('use_system')} + label={'Use system default'} + /> + {' '} + + } + this.handleChangeTrayIconTheme('light')} + label={'Light'} + /> + {' '} + this.handleChangeTrayIconTheme('dark')} + label={'Dark'} + /> + , + ); + } } if (window.process.platform === 'linux' || window.process.platform === 'win32') {