Nicklist themes currently ship a single pixmap size optimized for low-DPI displays. We need to: - Revamp the theme format to support shipping multiple sizes and/or scalable assets. We should look at the tray icon overlay stuff in Plasma themes for inspiration there. - Fix the code to properly use the assets. Again the Plasma tray overlay theme code should serve as a useful precedent here; we probably want QIcon to do all the selection work for us. - Bring up at least the default theme to hi-dpi standards. - Retain backwards compatibility with existing third-party themes. Reproducible: Always
Given you load them as pixmaps manually from a filename if someone shipped .pngs called irc_admin@2x.png it will load it automatically and set the right devicePixelRatio The rest of your painting code looks to be fine.
(In reply to David Edmundson from comment #1) > Given you load them as pixmaps manually from a filename if someone shipped > .pngs called > irc_admin@2x.png it will load it automatically and set the right > devicePixelRatio Neat, learned something new, was not aware of that QImageReader feature :) Though in Konversation case some pixmap overlay work is done, like putting the away or operator state pixmap on top of the user icon, so we need to replicate such loading behaviour to also pick up @2x variant files ourselves. https://invent.kde.org/network/konversation/-/merge_requests/8 would be a first approach to the problem: it extends the current support to alternatively to PNG icons load and use SVG icons, if files are found with the SVG suffix. And for the PNG icons it checks for the presence of "@2x" PNG files and if present loads them to create and add alternative hidpi pixmaps to the QIcons used in the nick list.
*** Bug 392810 has been marked as a duplicate of this bug. ***
Git commit 42dc7b1429853f0840e4209d9faef3454a034898 by Friedrich W. H. Kossebau. Committed on 12/10/2020 at 07:25. Pushed by kossebau into branch '1.7'. Support SVG nick icon themes, switch default to SVG M +13 -3 data/images/nickicons/default/CMakeLists.txt D +- -- data/images/nickicons/default/irc_admin.png A +20 -0 data/images/nickicons/default/irc_admin.svg D +- -- data/images/nickicons/default/irc_away.png A +11 -0 data/images/nickicons/default/irc_away.svg D +- -- data/images/nickicons/default/irc_away_stacked.png A +11 -0 data/images/nickicons/default/irc_away_stacked.svg D +- -- data/images/nickicons/default/irc_halfop.png A +18 -0 data/images/nickicons/default/irc_halfop.svg D +- -- data/images/nickicons/default/irc_normal.png A +20 -0 data/images/nickicons/default/irc_normal.svg D +- -- data/images/nickicons/default/irc_op.png A +9 -0 data/images/nickicons/default/irc_op.svg D +- -- data/images/nickicons/default/irc_owner.png A +20 -0 data/images/nickicons/default/irc_owner.svg D +- -- data/images/nickicons/default/irc_voice.png A +18 -0 data/images/nickicons/default/irc_voice.svg M +1 -0 src/CMakeLists.txt M +0 -15 src/common.cpp M +0 -1 src/common.h M +12 -9 src/config/theme_config.cpp M +1 -1 src/irc/nick.cpp M +30 -15 src/irc/nicklistview.cpp M +3 -6 src/irc/nicksonline.cpp M +14 -145 src/viewer/images.cpp M +7 -7 src/viewer/images.h A +307 -0 src/viewer/nickiconset.cpp [License: GPL (v2+)] A +45 -0 src/viewer/nickiconset.h [License: GPL (v2+)] https://invent.kde.org/network/konversation/commit/42dc7b1429853f0840e4209d9faef3454a034898