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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user