From 3e7e7b1af3215965430cdda60682a8bdc1e98526 Mon Sep 17 00:00:00 2001 From: Andrew Hayzen Date: Tue, 2 Mar 2021 22:49:45 +0000 Subject: [PATCH] Disable system tray related settings if not available --- src/gui/src/SettingsDialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/src/SettingsDialog.cpp b/src/gui/src/SettingsDialog.cpp index 1caeae5d..37c34714 100644 --- a/src/gui/src/SettingsDialog.cpp +++ b/src/gui/src/SettingsDialog.cpp @@ -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(appConfig().elevateMode())); #else