[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
This commit is contained in:
Vlad Zagorodniy 2019-07-02 20:47:40 +03:00
parent 1892bd33f2
commit bb6d1153f7

View file

@ -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