Skip to content

Commit

Permalink
[48_2] Fix High DPI policy on Qt < 5.14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
da-liii authored Oct 8, 2023
1 parent d200120 commit 230bb1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Plugins/Qt/QTMApplication.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,10 @@ class QTMApplication: public QApplication {
QApplication (argc, argv) {
init_palette (this);
init_style_sheet (this);
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::RoundPreferFloor);
#if (QT_VERSION >= 0x060000)
#endif
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
if (!retina_manual) {
qreal ratio = QApplication::primaryScreen ()->devicePixelRatio ();
retina_factor= qRound (ratio - 0.1);
Expand Down

0 comments on commit 230bb1c

Please sign in to comment.