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
commit a1a6a7ef56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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))