Merge "roundToIconSize(0) should return 0"
This commit is contained in:
commit
2c8dd8982d
@ -107,9 +107,10 @@ QQmlPropertyMap *Units::iconSizes() const
|
|||||||
int Units::roundToIconSize(int size)
|
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*/
|
/*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;
|
return KIconLoader::SizeSmall/2;
|
||||||
|
|
||||||
} else if (size < KIconLoader::SizeSmallMedium) {
|
} else if (size < KIconLoader::SizeSmallMedium) {
|
||||||
return KIconLoader::SizeSmall;
|
return KIconLoader::SizeSmall;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user