summary refs log tree commit diff
path: root/src/TrayIcon.cpp
diff options
context:
space:
mode:
authorIntegral <integral@member.fsf.org>2024-07-07 23:28:36 +0800
committerIntegral <integral@member.fsf.org>2024-07-07 23:28:36 +0800
commit01cc12fede5462c788a8fd022ae95701b08e104e (patch)
treec602735d90e8c62be8580f7c6e757897070f465c /src/TrayIcon.cpp
parentNlohmann is in brew repos now so remove tap (diff)
downloadnheko-01cc12fede5462c788a8fd022ae95701b08e104e.tar.xz
Add number of unread messages to tray icon toolIip
Diffstat (limited to 'src/TrayIcon.cpp')
-rw-r--r--src/TrayIcon.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/TrayIcon.cpp b/src/TrayIcon.cpp

index c62fecea..776140f2 100644 --- a/src/TrayIcon.cpp +++ b/src/TrayIcon.cpp
@@ -129,6 +129,13 @@ TrayIcon::setUnreadCount(int count) previousCount = count; } #endif + + QString toolTip = QLatin1String("nheko"); + if (count > 0) { + toolTip.append(tr("\n%1 unread message(s)").arg(count)); + } + + setToolTip(toolTip); } #include "moc_TrayIcon.cpp"