corrected issue in display of download/upload progress

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2192 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-02-04 21:08:53 +00:00
parent 163ed040be
commit c2fdbe177d
5 changed files with 30 additions and 40 deletions

View file

@ -150,18 +150,15 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti
{
// create a xProgressBar
FileProgressInfo pinfo = index.data().value<FileProgressInfo>() ;
xProgressBar progressBar(pinfo.cmap,option.rect, painter); // the 3rd param is the color schema (0 is the default value)
xProgressBar progressBar(pinfo,option.rect, painter); // the 3rd param is the color schema (0 is the default value)
if(pinfo.type == FileProgressInfo::DOWNLOAD_LINE)
{
progressBar.setDisplayText(true); // should display % text?
progressBar.setValue(pinfo.progress); // set the progress value
progressBar.setColorSchema(0) ;
}
else
{
progressBar.setDisplayText(false); // should display % text?
progressBar.setValue(pinfo.progress); // set the progress value
progressBar.setColorSchema(1) ;
}
progressBar.setVerticalSpan(1);