2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Update icons when icon theme on Linux changes

This commit is contained in:
Ilya Fedin
2023-05-27 12:35:17 +04:00
committed by John Preston
parent 6aef6d7f4e
commit 2ce9e610fa
4 changed files with 17 additions and 9 deletions

View File

@@ -100,6 +100,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtCore/QMimeDatabase>
#include <QtGui/QGuiApplication>
#include <QtGui/QScreen>
#include <QtGui/QWindow>
namespace Core {
namespace {
@@ -676,6 +677,13 @@ bool Application::eventFilter(QObject *object, QEvent *e) {
}
}
} break;
case QEvent::ThemeChange: {
if (Platform::IsLinux() && object == QGuiApplication::allWindows().first()) {
Core::App().refreshApplicationIcon();
Core::App().tray().updateIconCounters();
}
} break;
}
return QObject::eventFilter(object, e);