File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -286,17 +286,25 @@ void DesktopIntegration::createTrayIcon()
286
286
QIcon DesktopIntegration::getSystrayIcon () const
287
287
{
288
288
const TrayIcon::Style style = Preferences::instance ()->trayIconStyle ();
289
+ QIcon icon;
289
290
switch (style)
290
291
{
291
292
default :
292
293
case TrayIcon::Style::Normal:
293
- return UIThemeManager::instance ()->getIcon (u" qbittorrent-tray" _s);
294
-
294
+ icon = UIThemeManager::instance ()->getIcon (u" qbittorrent-tray" _s);
295
+ break ;
295
296
case TrayIcon::Style::MonoDark:
296
- return UIThemeManager::instance ()->getIcon (u" qbittorrent-tray-dark" _s);
297
-
297
+ icon = UIThemeManager::instance ()->getIcon (u" qbittorrent-tray-dark" _s);
298
+ break ;
298
299
case TrayIcon::Style::MonoLight:
299
- return UIThemeManager::instance ()->getIcon (u" qbittorrent-tray-light" _s);
300
+ icon = UIThemeManager::instance ()->getIcon (u" qbittorrent-tray-light" _s);
301
+ break ;
300
302
}
303
+ #if ((QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && defined(Q_OS_UNIX) && !defined(Q_OS_MACOS))
304
+ // Workaround for invisible tray icon in KDE, https://bugreports.qt.io/browse/QTBUG-53550
305
+ return {icon.pixmap (32 )};
306
+ #else
307
+ return icon;
308
+ #endif
301
309
}
302
310
#endif // Q_OS_MACOS
You can’t perform that action at this time.
0 commit comments