Summary: | Nicklist themes don't scale to higher DPI | ||
---|---|---|---|
Product: | [Applications] konversation | Reporter: | Eike Hein <hein> |
Component: | general | Assignee: | Konversation Developers <konversation-devel> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | andrew.crouthamel, kde, kossebau |
Priority: | NOR | ||
Version: | frameworks | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Bug Depends on: | |||
Bug Blocks: | 341361 |
Description
Eike Hein
2014-11-28 14:45:49 UTC
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 |