Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong UI scaling #869

Open
floli opened this issue Jan 13, 2018 · 14 comments
Open

Wrong UI scaling #869

floli opened this issue Jan 13, 2018 · 14 comments

Comments

@floli
Copy link

floli commented Jan 13, 2018

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.

@trollixx
Copy link
Member

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

@floli
Copy link
Author

floli commented Jan 14, 2018

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

resolution is 1920x1080 at a Thinkpad T440s.

@trollixx
Copy link
Member

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

@floli
Copy link
Author

floli commented Jan 15, 2018

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.

@trollixx
Copy link
Member

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

@trollixx
Copy link
Member

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

@trollixx
Copy link
Member

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

@bcm0
Copy link

bcm0 commented Jan 17, 2018

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

@trollixx
Copy link
Member

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 trollixx changed the title GUI too large Wrong UI scaling Jan 17, 2018
@rogatty
Copy link

rogatty commented Jan 19, 2018

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

@trollixx
Copy link
Member

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

@trollixx
Copy link
Member

Should be fixed in Qt 5.14.

@FlorianFranzen
Copy link

FlorianFranzen commented Aug 2, 2022

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.

@trollixx
Copy link
Member

trollixx commented Aug 3, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

5 participants