Merge pull request #8868 from Chocobo1/macos

Fix GUI scaling factor on macOS
This commit is contained in:
sledgehammer999
2018-05-27 17:39:00 +03:00
committed by GitHub
8 changed files with 31 additions and 9 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))