mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Prefer floor rounding for Qt 5.14+ fractional DPI handling
* Non-integer DPI handling is fundamentally a broken concept, because UIs are essentially pixel art with some vector drawing. Rounding down half fractions seems to be a better tradeoff than rounding up or trying to render them as-is.
This commit is contained in:
@@ -94,6 +94,11 @@ int main(int argc, char *argv[])
|
||||
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
|
||||
|
||||
#if(QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(
|
||||
Qt::HighDpiScaleFactorRoundingPolicy::RoundPreferFloor);
|
||||
#endif
|
||||
|
||||
QApplication::setApplicationVersion(lit(FULL_VERSION_STRING));
|
||||
|
||||
// shortcut here so we can run this with a non-GUI application
|
||||
|
||||
Reference in New Issue
Block a user