don't make pixmaps bigger than needed

create the pixmap texture of icons just as big as icon's actualsize
for that given size, not having unneeded padding around.
It also makes plaintedWidth/paintedHeight return actually sensible
values
This commit is contained in:
Marco Martin 2020-12-21 13:56:52 +01:00
parent 908a9effcf
commit f9b4b12b38

View File

@ -85,7 +85,7 @@ public:
QPixmap pixmap(const QSize &size) override
{
KIconLoader::global()->setCustomPalette(Plasma::Theme().palette());
QPixmap result = m_icon.pixmap(window(), size);
QPixmap result = m_icon.pixmap(window(), m_icon.actualSize(size));
KIconLoader::global()->resetPalette();
return result;
}