diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index 956ab0fd8..50937aaeb 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #ifdef Q_OS_MAC #include @@ -2249,7 +2250,14 @@ void Widget::onTryCreateTrayIcon() icon = std::unique_ptr(new QSystemTrayIcon); updateIcons(); trayMenu = new QMenu(this); + QLabel* trayUser = new QLabel(getUsername(), this); + QWidgetAction* trayUserAction = new QWidgetAction(trayMenu); + trayUser->setAlignment(Qt::AlignCenter); + trayUserAction->setDefaultWidget(trayUser); + + trayMenu->addAction(trayUserAction); + trayMenu->addSeparator(); // adding activate to the top, avoids accidentally clicking quit trayMenu->addAction(actionShow); trayMenu->addSeparator();