mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-26 17:58:19 +03:00
Fix invisible tray icon on Plasma 6 in Linux
PR #20529. Closes #20367. --------- Co-authored-by: thalieht <thalieht@users.noreply.github.com> Co-authored-by: Vladimir Golovnev <glassez@yandex.ru>
This commit is contained in:
parent
d5a3f724ab
commit
64acc64c58
1 changed files with 5 additions and 4 deletions
|
@ -31,6 +31,7 @@
|
|||
|
||||
#include <chrono>
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QMenu>
|
||||
#include <QTimer>
|
||||
|
||||
|
@ -300,11 +301,11 @@ QIcon DesktopIntegration::getSystrayIcon() const
|
|||
icon = UIThemeManager::instance()->getIcon(u"qbittorrent-tray-light"_s);
|
||||
break;
|
||||
}
|
||||
#if ((QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && defined(Q_OS_UNIX) && !defined(Q_OS_MACOS))
|
||||
#ifdef Q_OS_UNIX
|
||||
// Workaround for invisible tray icon in KDE, https://bugreports.qt.io/browse/QTBUG-53550
|
||||
return {icon.pixmap(32)};
|
||||
#else
|
||||
return icon;
|
||||
if (qEnvironmentVariable("XDG_CURRENT_DESKTOP").compare(u"KDE", Qt::CaseInsensitive) == 0)
|
||||
return icon.pixmap(32);
|
||||
#endif
|
||||
return icon;
|
||||
}
|
||||
#endif // Q_OS_MACOS
|
||||
|
|
Loading…
Reference in a new issue