Browse Source

Don't round scaling factor

Qt 5.14 introduced new feature related to HighDPI screens support,
this parameter is called "scale factor rounding policy", and it is
intended to improve fractional scale factor support (like 150%).
Qt::PassThrough value guarantee that no any rounding will applied to
scale factor, and will be used as is.
adaptive-webui-19844
Nick Korotysh 5 years ago
parent
commit
a9b0d84df9
No known key found for this signature in database
GPG Key ID: 7D0D4117C97CCC46
  1. 3
      src/app/main.cpp

3
src/app/main.cpp

@ -136,6 +136,9 @@ int main(int argc, char *argv[]) @@ -136,6 +136,9 @@ int main(int argc, char *argv[])
// Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created
if (qgetenv("QT_ENABLE_HIGHDPI_SCALING").isEmpty() && qgetenv("QT_AUTO_SCREEN_SCALE_FACTOR").isEmpty())
Application::setAttribute(Qt::AA_EnableHighDpiScaling, true);
// HighDPI scale factor policy must be set before QGuiApplication is created
if (qgetenv("QT_SCALE_FACTOR_ROUNDING_POLICY").isEmpty())
Application::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
#endif
try {

Loading…
Cancel
Save