Skip to content

Commit

Permalink
Improve DPI scaling behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
gsurkov committed Mar 3, 2023
1 parent 404f7b7 commit 701ffe5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions application/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ int main(int argc, char *argv[])
QCoreApplication::setApplicationVersion(APP_VERSION);
QCoreApplication::setOrganizationName(QStringLiteral("Flipper Devices Inc"));
QCoreApplication::setOrganizationDomain(QStringLiteral("flipperdevices.com"));

#if QT_VERSION < 0x060000
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif

QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::RoundPreferFloor);

Application app(argc, argv);
return app.exec();
}

0 comments on commit 701ffe5

Please sign in to comment.