https://bugs.kde.org/show_bug.cgi?id=471443

--- Comment #11 from Ilya Fedin <fedin-ilja2...@ya.ru> ---
> Font DPI and scaling are separate concepts. We *do* use Xft.dpi in xrdb.
> We still need something for the applications to scale instead of just 
> adjusting their font. 

David, Qt uses DPI to do scaling on both Windows and X11. It's the intended
behavior to do scaling on those systems. The problem is just some Qt
applications don't enable HiDPI scaling, it's opt-in in Qt 5. Application
should do this in Qt 5 to achieve HiDPI scaling:

QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);

With Qt 6, it works out-of-the-box. QT_SCREEN_SCALE_FACTORS being a
user-override variable discards all this so Qt 5 applications being scaled even
without these lines. For some applciations this hide the problem that they
didn't enabled HiDPI scaling so it won't be scaled on other systems (non-KDE
Linux or Windows). That's probably why most Qt 5 applications don't being
scaled automatically outside of KDE on Linux: KDE hides that. For other
applications like Telegram, this breaks entire application UI on KDE despite
application developers did everything right (the right
HighDpiScaleFactorRoundingPolicy is set).

The reality is that Xft.dpi is for UI scaling. But KDE interprets it
incorrectly as font DPI setting and tinkers with sets of these debug variables
instead (what is likely to always produce various bugs, just like it was when
KDE was setting debug GTK variables).

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to