zealdocs/zeal

Wrong UI scaling

floli opened this issue · 14 comments

floli commented

Hello,

I experience that the Zeal GUI is scaled too large, i.e. fonts too big, spaces between icons too large. See attached screen shot. This occurs only with Zeal, no with other KDE or pure Qt applications, such as qt5ct.
zeal

Zeal 0.5.0 @ Arch, Qt 5.10.0, $QT_QPA_PLATFORMTHEME = qt5ct.

What about resolution and DPI of your monitor? Is it a high density screen?

floli commented
% xdpyinfo | grep dots
  resolution:    96x96 dots per inch

resolution is 1920x1080 at a Thinkpad T440s.

I wonder if qt5ct is the culprit here. Do you get the same problem if qt5ct is not in use?

floli commented

It changed after I unset QT_QPA_PLATFORMTHEME, see screenshot
zeal_no_qt_qpa

The icons on the left are normal size, but the font size is still too large. Also note that the back/forward icons are gone.

Please try Otter Browser or QupZilla, and see if the problem also affects them.

Zeal doesn't do anything to change how it looks, so I am really not sure where this issue is coming from.

One more thing to try would be commenting out QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); in main.cpp.

bcm0 commented

Same problem for me. In QupZilla GUI and fonts are normal.
Commenting out suggested line helped. Thank you.

Otter Browser got bitten by this problem already [OtterBrowser/otter-browser#1428][OtterBrowser/otter-browser#1447].

Must be a bug in Qt. Zeal has the scaling enabled for quite a while now, not sure if disabling it be the right solution...

I have the same issue. I'm using QT_AUTO_SCREEN_SCALE_FACTOR=0 zeal to bypass it.
http://doc.qt.io/qt-5/highdpi.html#high-dpi-support-in-qt

Related Qt bugreports: QTBUG-53022, QTBUG-73231.

Should be fixed in Qt 5.14.

Just FYI, on Wayland under sway with Zeal from master and build against Qt 5.15, I still have to start Zeal with QT_AUTO_SCREEN_SCALE_FACTOR=0 for it to behave like all my other various Qt-based apps when it comes to scaling. And it has to be 0. Setting it to anything else, even my real scaling or not setting it at all has no effect on the UIs scaling.

@FlorianFranzen Can you try building with Qt 6 and code from #1420? Scaling is supposed to work out of the box with Qt 6.