diff options
author | Hannah von Reth <hannah.vonreth@owncloud.com> | 2020-09-07 12:58:50 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2020-09-07 17:02:57 +0300 |
commit | 7478799d3c70a99ecabef4baf8e9f6428cdf7839 (patch) | |
tree | 0d9838709e24190dce78f80d36000ad9424a5562 /src/crashreporter | |
parent | da3df1a0c744a308734b50a1e6e02873327947b2 (diff) |
Crashreporter: Apply the same hdpi settings as to the main gui
Fixes: #8042
Diffstat (limited to 'src/crashreporter')
-rw-r--r-- | src/crashreporter/main.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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; |