Merge branch 'master' of github.com:Nheko-Reborn/nheko

This commit is contained in:
Nicolas Werner 2026-02-20 01:33:15 +01:00
commit f91427e653
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9

View file

@ -110,14 +110,11 @@ TrayIcon::TrayIcon(const QString &filename, QWindow *parent)
toggleAction_ = new QAction(tr("Show"), this); toggleAction_ = new QAction(tr("Show"), this);
quitAction_ = new QAction(tr("Quit"), this); quitAction_ = new QAction(tr("Quit"), this);
connect(toggleAction_, &QAction::triggered, parent, [=, this]() { connect(parent, &QWindow::visibleChanged, toggleAction_, [=, this] {
if (parent->isVisible()) { toggleAction_->setText(tr(parent->isVisible() ? "Hide" : "Show"));
parent->hide(); });
toggleAction_->setText(tr("Show")); connect(toggleAction_, &QAction::triggered, parent, [=] {
} else { parent->isVisible() ? parent->hide() : parent->show();
parent->show();
toggleAction_->setText(tr("Hide"));
}
}); });
connect(quitAction_, &QAction::triggered, this, QApplication::quit); connect(quitAction_, &QAction::triggered, this, QApplication::quit);