settings: add option to minimize to tray

This commit is contained in:
tobtoht
2025-03-04 15:31:34 +01:00
parent e55afe9429
commit bb1015731f
7 changed files with 68 additions and 25 deletions
+3 -3
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->setVisible(!conf()->get(Config::hideTrayIcon).toBool());
m_tray->setVisible(conf()->get(Config::showTrayIcon).toBool());
this->initSkins();
this->patchMacStylesheet();
@@ -194,8 +194,8 @@ 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::showTrayIcon, [this](bool visible) {
m_tray->setVisible(visible);
});
connect(&settings, &Settings::pluginConfigured, [this](const QString &id) {
emit pluginConfigured(id);