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,24 +25,18 @@
QIcon PopularityDefs::icon(int popularity)
{
if (popularity == 0) {
if (popularity <= 1)
return QIcon(":/images/hot_0.png");
} else if (popularity <= 1) {
/* 1-1 */
else if (popularity <= 2) /* 1-1 */
return QIcon(":/images/hot_1.png");
} else if (popularity <= 2) {
/* 2-2 */
else if (popularity <= 5) /* 2-2 */
return QIcon(":/images/hot_2.png");
} else if (popularity <= 5) {
/* 3-5 */
else if (popularity <= 10) /* 3-5 */
return QIcon(":/images/hot_3.png");
} else if (popularity <= 10) {
/* 6-10 */
else if (popularity <= 20) /* 6-10 */
return QIcon(":/images/hot_4.png");
}
/* >10 */
return QIcon(":/images/hot_5.png");
else /* >10 */
return QIcon(":/images/hot_5.png");
}
QString PopularityDefs::tooltip(int popularity)