improved display of popularity

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7643 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2014-10-26 16:29:09 +00:00
parent 90b57337f5
commit d45a935b3c

View file

@ -25,23 +25,17 @@
QIcon PopularityDefs::icon(int popularity) QIcon PopularityDefs::icon(int popularity)
{ {
if (popularity == 0) { if (popularity <= 1)
return QIcon(":/images/hot_0.png"); return QIcon(":/images/hot_0.png");
} else if (popularity <= 1) { else if (popularity <= 2) /* 1-1 */
/* 1-1 */
return QIcon(":/images/hot_1.png"); return QIcon(":/images/hot_1.png");
} else if (popularity <= 2) { else if (popularity <= 5) /* 2-2 */
/* 2-2 */
return QIcon(":/images/hot_2.png"); return QIcon(":/images/hot_2.png");
} else if (popularity <= 5) { else if (popularity <= 10) /* 3-5 */
/* 3-5 */
return QIcon(":/images/hot_3.png"); return QIcon(":/images/hot_3.png");
} else if (popularity <= 10) { else if (popularity <= 20) /* 6-10 */
/* 6-10 */
return QIcon(":/images/hot_4.png"); return QIcon(":/images/hot_4.png");
} else /* >10 */
/* >10 */
return QIcon(":/images/hot_5.png"); return QIcon(":/images/hot_5.png");
} }