zeal icon indicating copy to clipboard operation
zeal copied to clipboard

Wrong UI scaling

Open floli opened this issue 7 years ago • 14 comments

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.

floli avatar Jan 13 '18 18:01 floli

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

trollixx avatar Jan 13 '18 21:01 trollixx

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

resolution is 1920x1080 at a Thinkpad T440s.

floli avatar Jan 14 '18 11:01 floli

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

trollixx avatar Jan 14 '18 20:01 trollixx

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.

floli avatar Jan 15 '18 10:01 floli

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

trollixx avatar Jan 15 '18 12:01 trollixx

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

trollixx avatar Jan 15 '18 12:01 trollixx

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

trollixx avatar Jan 15 '18 12:01 trollixx

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

bcm0 avatar Jan 17 '18 15:01 bcm0

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

trollixx avatar Jan 17 '18 21:01 trollixx

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

rogatty avatar Jan 19 '18 21:01 rogatty

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

trollixx avatar Sep 29 '19 05:09 trollixx

Should be fixed in Qt 5.14.

trollixx avatar Sep 29 '19 05:09 trollixx

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 avatar Aug 02 '22 09:08 FlorianFranzen

@FlorianFranzen Can you try building with Qt 6 and code from https://github.com/zealdocs/zeal/pull/1420? Scaling is supposed to work out of the box with Qt 6.

trollixx avatar Aug 03 '22 00:08 trollixx