[Icon Item] Round size we want to load a pixmap in

QML sizes can be fractional. In case we're asked to load a 31.5 px pixmap it would truncate
it to 31 and then round down to 22 causing a blurry result. Instead, round the size.

Differential Revision: https://phabricator.kde.org/D4040
This commit is contained in:
Kai Uwe Broulik 2017-01-11 10:34:35 +01:00
parent 57d58e371d
commit 0a7ae2ce97

View File

@ -452,7 +452,7 @@ void IconItem::loadPixmap()
return;
}
const int size = Units::roundToIconSize(qMin(width(), height()));
const int size = Units::roundToIconSize(qMin(qRound(width()), qRound(height())));
//final pixmap to paint
QPixmap result;