From bb6d1153f71a29cc846349f36f2bc0161c522608 Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Tue, 2 Jul 2019 20:47:40 +0300 Subject: [PATCH] [plugins/qpa] Return a fixed value logicalDpi Summary: Font scaling is based on the screen scale factor so we can just return dpi of 96. Reviewers: #kwin, davidedmundson Reviewed By: #kwin, davidedmundson Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D22219 --- plugins/qpa/screen.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/qpa/screen.cpp b/plugins/qpa/screen.cpp index cd23dea9d8..4fd6fd2d51 100644 --- a/plugins/qpa/screen.cpp +++ b/plugins/qpa/screen.cpp @@ -62,12 +62,12 @@ QPlatformCursor *Screen::cursor() const QDpi Screen::logicalDpi() const { - static int force_dpi = qEnvironmentVariableIsSet("QT_WAYLAND_FORCE_DPI") ? qEnvironmentVariableIntValue("QT_WAYLAND_FORCE_DPI") : -1; - if (force_dpi > 0) { - return QDpi(force_dpi, force_dpi); + static int forceDpi = qEnvironmentVariableIsSet("QT_WAYLAND_FORCE_DPI") ? qEnvironmentVariableIntValue("QT_WAYLAND_FORCE_DPI") : -1; + if (forceDpi > 0) { + return QDpi(forceDpi, forceDpi); } - return QPlatformScreen::logicalDpi(); + return QDpi(96, 96); } qreal Screen::devicePixelRatio() const