Merge "roundToIconSize(0) should return 0"

This commit is contained in:
David Edmundson 2014-12-10 19:46:19 +01:00 committed by Gerrit Code Review
commit 2c8dd8982d

View File

@ -107,9 +107,10 @@ QQmlPropertyMap *Units::iconSizes() const
int Units::roundToIconSize(int size)
{
/*Do *not* use devicePixelIconSize here, we want to use the sizes of the pixmaps of the smallest icons on the disk. And those are unaffected by dpi*/
if (size < KIconLoader::SizeSmall) {
if (size <= 0) {
return 0;
} else if (size < KIconLoader::SizeSmall) {
return KIconLoader::SizeSmall/2;
} else if (size < KIconLoader::SizeSmallMedium) {
return KIconLoader::SizeSmall;