fixed display issue in transfers (bad colors in crosses)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2382 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-02-20 23:25:17 +00:00
parent 7625238724
commit f9a1bbf8c8
2 changed files with 6 additions and 0 deletions

View File

@ -160,6 +160,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti
// std::cerr << pinfo.cmap._map[i] << " " ;
// std::cerr << std::endl ;
painter->save() ;
xProgressBar progressBar(pinfo,option.rect, painter); // the 3rd param is the color schema (0 is the default value)
if(pinfo.type == FileProgressInfo::DOWNLOAD_LINE)
{
@ -173,6 +174,8 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti
}
progressBar.setVerticalSpan(1);
progressBar.paint(); // paint the progress bar
painter->restore() ;
}
painter->drawText(option.rect, Qt::AlignCenter, newopt.text);
break;

View File

@ -134,6 +134,7 @@ void ULListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti
FileProgressInfo pinfo = index.data().value<FileProgressInfo>() ;
// create a xProgressBar
painter->save() ;
xProgressBar progressBar(pinfo,option.rect,painter,0);// the 3rd param is the color schema (0 is the default value)
QString ext = QFileInfo(QString::fromStdString(index.sibling(index.row(), UNAME).data().toString().toStdString())).suffix();;
@ -145,6 +146,8 @@ void ULListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti
progressBar.setDisplayText(true); // should display % text?
progressBar.setVerticalSpan(1);
progressBar.paint(); // paint the progress bar
painter->restore() ;
}
painter->drawText(option.rect, Qt::AlignCenter, newopt.text);
break;