summaryrefslogtreecommitdiffstats
path: root/vcl/qt5/QtInstance.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/qt5/QtInstance.cxx')
-rw-r--r--vcl/qt5/QtInstance.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/qt5/QtInstance.cxx b/vcl/qt5/QtInstance.cxx
index 4880c1bdec..f87cdef934 100644
--- a/vcl/qt5/QtInstance.cxx
+++ b/vcl/qt5/QtInstance.cxx
@@ -708,6 +708,11 @@ std::unique_ptr<QApplication> QtInstance::CreateQApplication(int& nArgc, char**
// for scaled icons in the native menus
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
#endif
+ // force Qt::HighDpiScaleFactorRoundingPolicy::Round, which is the Qt 5 default
+ // policy and prevents incorrect rendering with the Qt 6 default policy
+ // Qt::HighDpiScaleFactorRoundingPolicy::PassThrough (tdf#159915)
+ QGuiApplication::setHighDpiScaleFactorRoundingPolicy(
+ Qt::HighDpiScaleFactorRoundingPolicy::Round);
FreeableCStr session_manager;
if (getenv("SESSION_MANAGER") != nullptr)