Replace raster qbt logo with vector version

Add helper function for svg icons.
This commit is contained in:
Chocobo1 2018-05-08 21:30:12 +08:00
parent f934042a98
commit 4d04af4043
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
4 changed files with 23 additions and 5 deletions

View file

@ -160,11 +160,13 @@ MainWindow::MainWindow(QWidget *parent)
// Setting icons
#ifndef Q_OS_MAC
#ifdef Q_OS_UNIX
if (Preferences::instance()->useSystemIconTheme())
setWindowIcon(QIcon::fromTheme("qbittorrent", QIcon(":/icons/skin/qbittorrent32.png")));
else
const QIcon appLogo = Preferences::instance()->useSystemIconTheme()
? QIcon::fromTheme("qbittorrent", QIcon(":/icons/skin/qbittorrent-tray.svg"))
: QIcon(":/icons/skin/qbittorrent-tray.svg");
#else
const QIcon appLogo(":/icons/skin/qbittorrent-tray.svg");
#endif // Q_OS_UNIX
setWindowIcon(QIcon(":/icons/skin/qbittorrent32.png"));
setWindowIcon(appLogo);
#endif // Q_OS_MAC
#if (defined(Q_OS_UNIX))