diff --git a/src/declarativeimports/core/units.cpp b/src/declarativeimports/core/units.cpp index dfc817af2..ba065539a 100644 --- a/src/declarativeimports/core/units.cpp +++ b/src/declarativeimports/core/units.cpp @@ -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;