UI: Only apply passthrough DPI scaling on Windows

Fixes #4031

It seems Qt on various flavours of Linux behaves erratically when scaled,
and for the moment macOS doesn't require fractional scaling support.

This commit can be reverted when Qt fixes issues on their side.
This commit is contained in:
Matt Gajownik 2021-01-13 20:26:35 +11:00
parent 96c7790d80
commit 46118470ab

View file

@ -1934,7 +1934,7 @@ static int run_program(fstream &logFile, int argc, char *argv[])
#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) && defined(_WIN32)
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(
Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
#endif