commit f92f2f95ffd5f0d9d9704c9d7f67e4a9e74db0f6
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Tue Mar 2 08:20:39 2021 +0100

    Cleanup High DPI support
    
    Disable for Qt >= 6 (this is the default now).
    
    Disable for macOS (does it in its own way).
---
 src/frontends/qt/GuiApplication.cpp |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/frontends/qt/GuiApplication.cpp 
b/src/frontends/qt/GuiApplication.cpp
index 2296a52..45e2d2b 100644
--- a/src/frontends/qt/GuiApplication.cpp
+++ b/src/frontends/qt/GuiApplication.cpp
@@ -181,6 +181,10 @@ frontend::Application * createApplication(int & argc, char 
* argv[])
        AllowSetForegroundWindow(ASFW_ANY);
 #endif
 
+
+// Setup high DPI handling. This is a bit complicated, but will be default in 
Qt6.
+// macOS does it by itself.
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && !defined(Q_OS_MAC)
 #if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)
     // Attribute Qt::AA_EnableHighDpiScaling must be set before 
QCoreApplication is created
     if (getEnv("QT_ENABLE_HIGHDPI_SCALING").empty()
@@ -193,6 +197,7 @@ frontend::Application * createApplication(int & argc, char 
* argv[])
     if (getEnv("QT_SCALE_FACTOR_ROUNDING_POLICY").empty())
         
QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
 #endif
+#endif
 
        frontend::GuiApplication * guiApp = new frontend::GuiApplication(argc, 
argv);
        // I'd rather do that in the constructor, but I do not think that
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to