Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
6.4.1
-
None
Description
I've noticed that scaling of fonts is broken on Windows in "certain cases". They are rendered too big - as if the normal UI scaling was applied and then some wrong additional scaling on top of that (see screenshot).
Steps to reproduce:
- Set scaling in Window's settings to 300 %. I've been trying this under a recently updated version of Windows 10.
- Open a Qt application using Qt 6.4.1 (likely any Qt version that contains 45358c29d53242bf5ff401d06eebec53ffc6c4c8 will do).
- I'm not quite sure what the exact case is that triggers this bug. I could reproduce it with a Qt Widgets based application that has a tray icon and a context menu assigned to that tray icon. One simply needs to open the tray icon's context menu then. The UI is scaled as expected but the fonts are rendered too big (see screenshot).
Workaround:
The diff between Qt 6.4.0 was fortunately not very big when it comes to relevant changes. So I figured out that reverting 45358c29d53242bf5ff401d06eebec53ffc6c4c8 fixes the problem. By the way, I could also reproduce the problem this commit is trying to fix and I like that it is being tackled. Unfortunatley this regression makes things even worse.
Further notes:
- The application I've been testing this with is https://github.com/Martchus/syncthingtray. It is a bit complex but the right-click menu is simply a QMenu assigned to a QSystemTrayIcon via setContextMenu() (see https://github.com/Martchus/syncthingtray/blob/66d485305bbe8928c0fe1f37612592d144d57ef9/tray/gui/trayicon.cpp#L82).
- The application also has a QMenu that is shown on a left-click. It is affected as well. Maybe all QMenu instances shown on top-level are affected? The left-click window can be configured to use normal window flags (instead of popup) but that doesn't make a different.
- The exact build I've been using to reproduce the issue is https://martchus.no-ip.biz/repo/arch/ownstuff/os/x86_64/mingw-w64-syncthingtray-1.3.1-1-any.pkg.tar.zst - The archive contains a statically linked exe for x86_64 and i686.
- The exact build I've been using to verify that the issue is gone is https://martchus.no-ip.biz/repo/arch/ownstuff/os/x86_64/mingw-w64-syncthingtray-qt6-1.3.1-2-any.pkg.tar.zst. It is linked against an identical Qt 6.4.1 build except that 45358c29d53242bf5ff401d06eebec53ffc6c4c8 has been reverted.
Attachments
Issue Links
- duplicates
-
QTBUG-108593 Reg->6.4.1: Windows/High DPI: Fonts are too large on High DPI screen
- Closed