diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2020-07-31 10:01:00 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2020-07-31 10:01:00 -0400 |
| commit | 6a1d57fe0c3d84f363cd687c7b6813eb947a6050 (patch) | |
| tree | d5a8651bba4c7a428546ca0224f590e5f7e88ff3 /src | |
| parent | 777229f28f8f5de19376459e85b434576af8e010 (diff) | |
fixed bad font scaling
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index f008896b..08889018 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -905,9 +905,20 @@ int main(int argc, char *argv[]) if (!tempDir.exists()) tempDir.root().mkpath(tempDir.canonicalPath()); - //Should allow for better scaling of ui with higher resolution displays + + // qt 5.14 changed how fraction font scaling works; by default 125% is + // rounded to 100% and 150% is rounded to 200%, which doesn't make any sense + // + // force qt to use the exact scaling value by change the policy to + // PassThrough + // + QGuiApplication::setHighDpiScaleFactorRoundingPolicy( + Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); + + // MO is somewhat high dpi aware QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); + if (argc >= 4) { std::vector<std::wstring> arg; auto args = UntouchedCommandLineArguments(2, arg); |
