[LyX/master] Account for true dpi

Enrico Forestieri forenr at lyx.org
Mon Feb 15 21:41:07 UTC 2021


commit a0a0119b48dece10f621a20fd84eef14ff200720
Author: Enrico Forestieri <forenr at lyx.org>
Date:   Mon Feb 15 22:43:36 2021 +0100

    Account for true dpi
    
    We have to account for the physical rather than logical dpi.
    
    See #12132.
---
 src/frontends/qt/GuiApplication.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt/GuiApplication.cpp b/src/frontends/qt/GuiApplication.cpp
index dc996a5..6395f8e 100644
--- a/src/frontends/qt/GuiApplication.cpp
+++ b/src/frontends/qt/GuiApplication.cpp
@@ -1112,7 +1112,7 @@ GuiApplication::GuiApplication(int & argc, char ** argv)
 
 	// needs to be done before reading lyxrc
 	QWidget w;
-	lyxrc.dpi = (w.logicalDpiX() + w.logicalDpiY()) / 2;
+	lyxrc.dpi = (w.physicalDpiX() + w.physicalDpiY()) / 2;
 
 	guiApp = this;
 


More information about the lyx-cvs mailing list