settings: add option to hide tray icon

This commit is contained in:
tobtoht
2025-03-04 10:09:25 +01:00
parent 3fa9240c0b
commit 88ab38a193
6 changed files with 54 additions and 30 deletions
+4 -1
View File
@@ -45,7 +45,7 @@ WindowManager::WindowManager(QObject *parent)
m_tray = new QSystemTrayIcon(icons()->icon("appicons/64x64.png"));
m_tray->setToolTip("Feather Wallet");
this->buildTrayMenu();
m_tray->show();
m_tray->setVisible(!conf()->get(Config::hideTrayIcon).toBool());
this->initSkins();
this->patchMacStylesheet();
@@ -194,6 +194,9 @@ void WindowManager::showSettings(Nodes *nodes, QWidget *parent, bool showProxyTa
window->onHideUpdateNotifications(hidden);
}
});
connect(&settings, &Settings::hideTrayIcon, [this](bool hidden) {
m_tray->setVisible(!hidden);
});
connect(&settings, &Settings::pluginConfigured, [this](const QString &id) {
emit pluginConfigured(id);
});