Created attachment 125006 [details] broken UI and menus Using master and Qt 5.14. The UI is broken with a recent kwrite build. Bisecting tells https://cgit.kde.org/kate.git/commit/?id=68a2de71 is the first commit showing the issue. Screenshots attached. This change breaks the toolbars, menus, aside preview, etc. The window is usable again if kwrite or kate are started with QT_AUTO_SCREEN_SCALE_FACTOR=0 kwrite
Created attachment 125007 [details] settings dialog
Ups, wrong commit, it started with https://cgit.kde.org/kate.git/commit/?id=4d09f48
Hmm, bad :/
What is your screen scale factor?
Running kwrite with QT_AUTO_SCREEN_SCALE_FACTOR=0 helps btw. I'm using a dual monitor setup but didn't change the scaling.
:( This is all crap I use at home 1.5 scaling with dual-head and I thought it works even after this patch, need to re-try that, not that I have actually used a Qt < 5.14 :/
Playing with the "global scale" settings in systemsettings/display & monitor "fixes" the broken UI elements but the font are (obviously) way too big
I don't actually understand why this change should trigger that :/
Note that previously, startkde was setting QT_AUTO_SCREEN_SCALE_FACTOR, this was disabled in https://cgit.kde.org/plasma-workspace.git/commit/?id=a0a80c67f
If we can fix that in kate/kwrite/... code, I am happy to do so, but what is actually the correct sequence of stuff to setup hidpi support? So far, it seemed to be: /** * enable high dpi support */ QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); And from Qt 5.14 on, one can allow e.g. stuff like 1.5 via (at least on Windows, on X11 it was always possible already before that): /** * allow fractional scaling */ #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); #endif
See more complaints about this in bug 373232. Konsole doesn't set setHighDpiScaleFactorRoundingPolicy yet, just the usual QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); That worked perfectly well before Qt 5.14 on my desktop with 1.5 scaling, now it is strange :/
I think QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); with QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); leads to doom. Shall I remove the QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true)?
Hmm, I guess I need to test this more extensive at home, at least in our company our UI guy has the same issue at the moment with the 5.14 update and our internal stuff. Some things look blurry now.
Now that plasma-workspace was updated to also set QT_AUTO_SCREEN_SCALE_FACTOR to 0 with Qt 5.14, I don't know what to do with this report.
No idea. I tried a bit more with the Qt flags, but without QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); scaling is problematic in other cases :/
Seems that the pass-through is a bad idea for unices :/ Let's just enable that at the moment for Windows, there it seems to properly work.
Git commit 577b74c7d8d4163c76c8d5f1511ce44520e03c85 by Christoph Cullmann. Committed on 26/01/2020 at 13:08. Pushed by cullmann into branch 'release/19.12'. only allow the new pass through policy for windows for unices (X11) this seems to cause issues M +4 -1 kate/main.cpp M +4 -1 kwrite/main.cpp https://invent.kde.org/kde/kate/commit/577b74c7d8d4163c76c8d5f1511ce44520e03c85
Git commit 577b74c7d8d4163c76c8d5f1511ce44520e03c85 by Christoph Cullmann. Committed on 26/01/2020 at 13:08. Pushed by scmsync into branch 'release/19.12'. only allow the new pass through policy for windows for unices (X11) this seems to cause issues M +4 -1 kate/main.cpp M +4 -1 kwrite/main.cpp https://commits.kde.org/kate/577b74c7d8d4163c76c8d5f1511ce44520e03c85
Should now be fixed in 19.12 branch + master