From 41e59e4f55b2c092b45afe2d8541f8198d41b534 Mon Sep 17 00:00:00 2001 From: Oliver Sander Date: Fri, 16 Jul 2021 11:10:53 +0200 Subject: [PATCH] Set Qt::HighDpiScaleFactorRoundingPolicy::PassThrough also on Unix Previously this was Windows-only, the reasons are described in https://bugs.kde.org/show_bug.cgi?id=416078 However, one and a half years later I don't see any negative effects when setting this option, (In fact, I don't see any effects at all), both for X11 and Wayland. Let's therefore enable PassThrough for Unix as well, in order to reduce the amount of platform-specific code. --- shell/main.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/shell/main.cpp b/shell/main.cpp index b4e68d0b9..ea251ee52 100644 --- a/shell/main.cpp +++ b/shell/main.cpp @@ -35,11 +35,8 @@ int main(int argc, char **argv) /** * allow fractional scaling - * we only activate this on Windows, it seems to creates problems on unices - * (and there the fractional scaling with the QT_... env vars as set by KScreen works) - * see bug 416078 */ -#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) && defined(Q_OS_WIN) +#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); #endif