提交 e08a8fc3 编写于 作者: M Matt Gajownik

UI: Don't round non-integer High DPI scale

This fixes an issue on Windows where loading on a
150% scale display renders OBS windows at 200%.

Reference: https://doc.qt.io/qt-5/qguiapplication.html#setHighDpiScaleFactorRoundingPolicy
上级 e436f6ab
......@@ -1932,6 +1932,10 @@ 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))
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(
Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
#endif
#if !defined(_WIN32) && !defined(__APPLE__) && BROWSER_AVAILABLE
setenv("QT_NO_GLIB", "1", true);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册