From 4ec193042fa1617193073aa986019df1070df720 Mon Sep 17 00:00:00 2001 From: Eugene Shalygin Date: Mon, 11 Sep 2017 16:18:10 +0200 Subject: [PATCH] Allow custom tray icons when system icon theme is used. Closes #7403. --- src/gui/mainwindow.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index b06095cb3..9f506ddcf 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -1943,15 +1943,12 @@ void MainWindow::checkForActiveTorrents() #ifndef Q_OS_MAC QIcon MainWindow::getSystrayIcon() const { -#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC)) - if (Preferences::instance()->useSystemIconTheme()) - return QIcon::fromTheme("qbittorrent-tray"); -#endif - const TrayIcon::Style style = Preferences::instance()->trayIconStyle(); // on Linux we use theme icons, and icons from resources everywhere else #if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC)) switch (style) { + case TrayIcon::NORMAL: + return QIcon::fromTheme(QLatin1String("qbittorrent-tray")); case TrayIcon::MONO_DARK: return QIcon::fromTheme(QLatin1String("qbittorrent-tray-dark")); case TrayIcon::MONO_LIGHT: