Skip to content

Commit

Permalink
Fix icon scaling for HiDPI displays (keepassxreboot#3332)
Browse files Browse the repository at this point in the history
* Only apply hidpi icons on Linux
  • Loading branch information
2xsaiko authored and droidmonkey committed Jun 30, 2019
1 parent f66e919 commit 12f42a5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ int main(int argc, char** argv)

#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#ifdef Q_OS_LINUX
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
#endif
#endif
#ifdef Q_OS_LINUX
if (qgetenv("XDG_SESSION_TYPE") == QByteArrayLiteral("wayland")) {
Expand Down

0 comments on commit 12f42a5

Please sign in to comment.