mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-18 05:50:39 -04:00
Enabled full chunk checking code:
- unchecked chunks are not made available to swarming sources, not saved as done. - force check now uses the simple method to put all chunks in checking mode - force checked files can be cancelled (finally!) - improved display (use red for active chunks, yellow for checking) - cache file are not using chunk checking (assume_availability=true) The code still contains the #ifdef. It should be removed soon if everything works ok. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5235 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
c26c1f2163
commit
36198b7e6a
6 changed files with 59 additions and 14 deletions
|
@ -225,16 +225,32 @@ void xProgressBar::paint()
|
|||
i += j ;
|
||||
}
|
||||
|
||||
QColor gradColor_a1, gradColor_a2 ;
|
||||
gradColor_a1.setRgb(223, 134, 6);
|
||||
gradColor_a2.setRgb(248, 170, 59);
|
||||
linearGrad.setColorAt(0.00, gradColor_a1);
|
||||
linearGrad.setColorAt(0.16, gradColor_a2);
|
||||
linearGrad.setColorAt(1.00, gradColor_a1);
|
||||
painter->setBrush(linearGrad);
|
||||
{
|
||||
QColor gradColor_a1, gradColor_a2 ;
|
||||
gradColor_a1.setRgb(170, 20, 9);
|
||||
gradColor_a2.setRgb(223, 121,123);
|
||||
linearGrad.setColorAt(0.00, gradColor_a1);
|
||||
linearGrad.setColorAt(0.16, gradColor_a2);
|
||||
linearGrad.setColorAt(1.00, gradColor_a1);
|
||||
painter->setBrush(linearGrad);
|
||||
|
||||
for(uint32_t i=0;i<_pinfo.chunks_in_progress.size();++i)
|
||||
painter->drawRect(rect.x() + hSpan+(int)rint(_pinfo.chunks_in_progress[i]*width/(float)ss), rect.y() + vSpan, (int)ceil(1.0f*width/(float)ss), rect.height() - 1 - vSpan * 2);
|
||||
for(uint32_t i=0;i<_pinfo.chunks_in_progress.size();++i)
|
||||
painter->drawRect(rect.x() + hSpan+(int)rint(_pinfo.chunks_in_progress[i]*width/(float)ss), rect.y() + vSpan, (int)ceil(1.0f*width/(float)ss), rect.height() - 1 - vSpan * 2);
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
QColor gradColor_a1, gradColor_a2 ;
|
||||
gradColor_a1.setRgb(186, 143, 0);
|
||||
gradColor_a2.setRgb(223, 196, 61);
|
||||
linearGrad.setColorAt(0.00, gradColor_a1);
|
||||
linearGrad.setColorAt(0.16, gradColor_a2);
|
||||
linearGrad.setColorAt(1.00, gradColor_a1);
|
||||
painter->setBrush(linearGrad);
|
||||
|
||||
for(uint32_t i=0;i<_pinfo.chunks_in_checking.size();++i)
|
||||
painter->drawRect(rect.x() + hSpan+(int)rint(_pinfo.chunks_in_checking[i]*width/(float)ss), rect.y() + vSpan, (int)ceil(1.0f*width/(float)ss), rect.height() - 1 - vSpan * 2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue