reduced cost of progress bar display

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2336 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-02-15 21:19:02 +00:00
parent 154ef63474
commit f0bb8153f8

View File

@ -202,9 +202,10 @@ void xProgressBar::paint()
while(i+j<ss && _pinfo.cmap[i+j])
++j ;
if(j>0)
float o = std::min(1.0f,j/(float)ss*width) ;
if(j>0 && o >= 1.0f) // limits the number of regions drawn
{
float o = std::min(1.0f,j/(float)ss*width) ;
painter->setOpacity(o) ;
painter->drawRect(rect.x() + hSpan+(int)rint(i*width/(float)ss), rect.y() + vSpan, (int)ceil(j*width/(float)ss), rect.height() - 1 - vSpan * 2);
}