D27533: [WIP] Add MarkInterfaceV2, to s/QPixmap/QIcon/g for symbols of marks
Friedrich W. H. Kossebau
noreply at phabricator.kde.org
Mon Feb 24 07:45:14 GMT 2020
kossebau added inline comments.
> dhaumann wrote in kateviewhelpers.cpp:1963
> This is true. But in this case a non-answer: Maybe QIcon::paint does it correct as well. In other words, the code can very likely be improved, but also ok as is.
@anthonyfieroni Why exactly do you think these calls should be kept, and how?
From what I understood the old code to do and tested before & after I had changed the code in the updated patch to now use QIcon::paint() instead of doing an own scaled QPixmap, the old logic used the devicePixelRatioF() calls as needed to match Qt's HiDPI support with internally bigger actual pixmaps.
Whereas QIcon cares for that now, also in the case where the QIcon is created from a single pixmap set via `setMarkPixmap()` in the backward-compat case. So there is nothing to be done on our side anymore: we just estimate the "normal" size of the icon to be painted, and QIcon will do the actual painting matching whatever the HiDPI settings are, like it does in all other places QIcon is used.
To: kossebau, #kate, #kdevelop, dhaumann
Cc: anthonyfieroni, dhaumann, kwrite-devel, kde-frameworks-devel, rrosch, LeGast00n, cblack, GB_2, domson, michaelh, ngraham, bruns, demsking, cullmann, sars
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the KWrite-Devel