mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
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:
parent
154ef63474
commit
f0bb8153f8
@ -202,9 +202,10 @@ void xProgressBar::paint()
|
|||||||
while(i+j<ss && _pinfo.cmap[i+j])
|
while(i+j<ss && _pinfo.cmap[i+j])
|
||||||
++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->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);
|
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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user