Created attachment 124344 [details] Screenshot of the issue. SUMMARY The " > " arrows are blurry on a HiDPI screen, while the rest is super sharp. This holds for all dialogs, where " > " is used. Please see the screenshot. SOFTWARE/OS VERSIONS Operating System: Manjaro Linux KDE Plasma Version: 5.17.4 KDE Frameworks Version: 5.65.0 Qt Version: 5.13.2 ADDITIONAL INFORMATION Scaling 1.5
I have cloned systemsettings, checked out v5.17.4 and compiled it locally on my Manjaro system. With that build, I cannot reproduce this issue and the one of the "blurry printers" (413977). Any ideas, what's going on? Has it been fixed by a recent commit to 5.17.4, which is not yet a part of the Manjaro 5.17.4 packages?
No, I see the issue as well with git master.
I think this can be fixed by using: QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); but I am not sure we should do that in the dialog code; I think it should be in the application where the dialog(s) is launched from.
(In reply to Ahmad Samir from comment #3) > I think this can be fixed by using: > QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); > QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); > > but I am not sure we should do that in the dialog code; I think it should be > in the application where the dialog(s) is launched from. No, such stuff must be done by the application, preferable "before" the application object is created.
That makes sense (and it benefits the whole app rather than just one dialog, that is if it works at all setting those attributes _after_ the application object has been created). Thanks for the confirmation :)
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kitemviews/-/merge_requests/10
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kxmlgui/-/merge_requests/104
Git commit a82076a6c353509ca404157237f61c6a28b37d3e by snooxx 💤. Committed on 16/03/2022 at 20:11. Pushed by ahmadsamir into branch 'master'. KShortcutsEditorDelegate: Fix HiDPI rendering of indicator arrows Even with HiDPI rendering enabled in applications, the standard "Configure Keyboard Shortcuts" dialog would still show pixelated indicator arrows in the "Shortcut" and "Alternate" columns. This is because the respective pixmap is only scaled up, but not rendered appropriately sized from the beginning. Setting the pixmap's `devicePixelRatio` and increasing its size fixes the issue. `option.rect` is in device independent pixels, and therefore should be kept as is. Note: In order for the arrows to still get drawn in the right place, additional fixes in `KExtendableItemDelegate` (i.e. the base class) are necessary, see frameworks/kitemviews!10. Test Plan: - Launch `QT_SCALE_FACTOR=1.7 ./bin/kxmlguiwindowtest`. - Open "Configure Keyboard Shortcuts" dialog. - Arrows in "Shortcut" column should not be pixelated anymore, for both their expanded and collapsed states. - Test with `-style Fusion` and other scaling factors, too. M +7 -2 src/kshortcutseditordelegate.cpp https://invent.kde.org/frameworks/kxmlgui/commit/a82076a6c353509ca404157237f61c6a28b37d3e
Git commit 1c15548132621f0a543572338402ff302c621ae1 by snooxx 💤. Committed on 17/03/2022 at 01:36. Pushed by meven into branch 'master'. KExtendableItemDelegate: Fix HiDPI positioning of indicator arrows After fixing pixelated indicator arrows in `KShortcutsEditorDelegate` (i.e. a subclass, see frameworks/kxmlgui!104) used in the "Configure Keyboard Shortcuts" dialog, they were not drawn centered anymore, e.g. slightly moved upwards. The same problem can be observed in the download list of KGet. This is because the increased size of the pixmap is not accounted for. By transforming the pixmap size to device independent dimensions again, as used in the positioning calculations, the arrows will finally be shown correctly. Note that running `KItemViews` in conjunction with a version of `KXmlGUI` not including the fix will still work fine, since the `devicePixelRatio` will only ever be set to `1` in that case. Test Plan: - Launch `QT_SCALE_FACTOR=1.7 ./bin/kxmlguiwindowtest` (from KXmlGui, including the fix mentioned above). - Open "Configure Keyboard Shortcuts" dialog. - Arrows in "Shortcut" column positioned correctly, for both their expanded and collapsed states. - Test with `-style Fusion` and other scaling factors, too. - `QT_SCALE_FACTOR=1.7 kget`, start download, observe indicator arrow in download list. M +10 -8 src/kextendableitemdelegate.cpp https://invent.kde.org/frameworks/kitemviews/commit/1c15548132621f0a543572338402ff302c621ae1