mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-08-31 16:12:15 +00:00
Partially revert 30f21259f8c219.
Fixes Linux issue for when the theme doesn't have a corresponding icon.
This commit is contained in:
parent
f94d733c62
commit
2e6c890883
@ -1512,11 +1512,6 @@ void MainWindow::checkForActiveTorrents()
|
|||||||
|
|
||||||
QIcon MainWindow::getSystrayIcon() const
|
QIcon MainWindow::getSystrayIcon() const
|
||||||
{
|
{
|
||||||
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC))
|
|
||||||
if (Preferences::instance()->useSystemIconTheme())
|
|
||||||
return QIcon::fromTheme("qbittorrent");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
TrayIcon::Style style = Preferences::instance()->trayIconStyle();
|
TrayIcon::Style style = Preferences::instance()->trayIconStyle();
|
||||||
switch(style) {
|
switch(style) {
|
||||||
case TrayIcon::MONO_DARK:
|
case TrayIcon::MONO_DARK:
|
||||||
@ -1528,9 +1523,16 @@ QIcon MainWindow::getSystrayIcon() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
QIcon icon;
|
QIcon icon;
|
||||||
icon.addFile(":/icons/skin/qbittorrent16.png");
|
#if (defined(Q_OS_UNIX) && !defined(Q_OS_MAC))
|
||||||
icon.addFile(":/icons/skin/qbittorrent22.png");
|
if (Preferences::instance()->useSystemIconTheme())
|
||||||
icon.addFile(":/icons/skin/qbittorrent32.png");
|
icon = QIcon::fromTheme("qbittorrent");
|
||||||
|
|
||||||
|
#endif
|
||||||
|
if (icon.isNull()) {
|
||||||
|
icon.addFile(":/icons/skin/qbittorrent22.png", QSize(22, 22));
|
||||||
|
icon.addFile(":/icons/skin/qbittorrent16.png", QSize(16, 16));
|
||||||
|
icon.addFile(":/icons/skin/qbittorrent32.png", QSize(32, 32));
|
||||||
|
}
|
||||||
return icon;
|
return icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user