Disable system tray related settings if not available

This commit is contained in:
Andrew Hayzen 2021-03-02 22:49:45 +00:00
parent 35cc645637
commit 3e7e7b1af3
1 changed files with 4 additions and 0 deletions

View File

@ -52,6 +52,10 @@ SettingsDialog::SettingsDialog(QWidget* parent, AppConfig& config) :
m_pCheckBoxMinimizeToTray->setChecked(appConfig().getMinimizeToTray());
m_pCheckBoxEnableCrypto->setChecked(m_appConfig.getCryptoEnabled());
// Don't allow auto hide or minimise to tray if it's not available
m_pCheckBoxAutoHide->setEnabled(QSystemTrayIcon::isSystemTrayAvailable());
m_pCheckBoxMinimizeToTray->setEnabled(QSystemTrayIcon::isSystemTrayAvailable());
#if defined(Q_OS_WIN)
m_pComboElevate->setCurrentIndex(static_cast<int>(appConfig().elevateMode()));
#else