From d58cdaeb2a3d6061db040e42906adb9f3aec2e2c Mon Sep 17 00:00:00 2001 From: Hannah von Reth Date: Mon, 7 Sep 2020 11:58:50 +0200 Subject: [PATCH] Crashreporter: Apply the same hdpi settings as to the main gui Fixes: #8042 --- src/crashreporter/main.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/crashreporter/main.cpp b/src/crashreporter/main.cpp index 631c211b5..7d647426f 100644 --- a/src/crashreporter/main.cpp +++ b/src/crashreporter/main.cpp @@ -22,8 +22,22 @@ int main(int argc, char *argv[]) { + QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); +#ifdef Q_OS_WIN + QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); +#endif // !Q_OS_WIN QApplication app(argc, argv); +#ifdef Q_OS_WIN + // The Windows style still has pixelated elements with Qt 5.6, + // it's recommended to use the Fusion style in this case, even + // though it looks slightly less native. Check here after the + // QApplication was constructed, but before any QWidget is + // constructed. + if (app.devicePixelRatio() > 1) + QApplication::setStyle(QStringLiteral("fusion")); +#endif // Q_OS_WIN + if (app.arguments().size() != 2) { qDebug() << "You need to pass the .dmp file path as only argument"; return 1; -- 2.30.2