From 09e1aa1530b91864ca5847da09c258568fefbd22 Mon Sep 17 00:00:00 2001 From: Tim Gromeyer Date: Fri, 16 May 2025 14:08:20 +0200 Subject: [PATCH] [Linux] Reset tray icon when airpods disconnect --- linux/main.cpp | 1 + linux/trayiconmanager.h | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/linux/main.cpp b/linux/main.cpp index 05e099a..1198d44 100644 --- a/linux/main.cpp +++ b/linux/main.cpp @@ -440,6 +440,7 @@ private slots: trayManager->showNotification( tr("AirPods Disconnected"), tr("Your AirPods have been disconnected")); + trayManager->resetTrayIcon(); } void bluezDeviceDisconnected(const QString &address, const QString &name) diff --git a/linux/trayiconmanager.h b/linux/trayiconmanager.h index a6384e3..25c1530 100644 --- a/linux/trayiconmanager.h +++ b/linux/trayiconmanager.h @@ -33,6 +33,12 @@ public: } } + void resetTrayIcon() + { + trayIcon->setIcon(QIcon(":/icons/assets/airpods.png")); + trayIcon->setToolTip(""); + } + signals: void notificationsEnabledChanged(bool enabled);