fix progress bar inversion

This commit is contained in:
Mitchell Livingston 2007-09-26 18:53:11 +00:00
parent 2b0a7153cc
commit a222ba1774
2 changed files with 8 additions and 8 deletions

View File

@ -1160,16 +1160,16 @@ static int static_lastid = 0;
return [self haveVerified] + fStat->haveUnchecked;
}
- (uint64_t) uploadedTotal
{
return fStat->uploadedEver;
}
- (uint64_t) downloadedTotal
{
return fStat->downloadedEver;
}
- (uint64_t) uploadedTotal
{
return fStat->uploadedEver;
}
- (uint64_t) failedHash
{
return fStat->corruptEver;

View File

@ -287,10 +287,10 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
if (progress < 1.0)
{
int rightWidth = leftWidth * progress;
float rightProgress = 1.0 - progress, progressLeft = [torrent progressLeft];
int rightWidth = leftWidth * rightProgress;
leftWidth -= rightWidth;
float rightProgress = 1.0 - progress, progressLeft = [torrent progressLeft];
if (progressLeft < rightProgress)
{
int rightNoIncludeWidth = rightWidth * ((rightProgress - progressLeft) / rightProgress);
@ -305,7 +305,7 @@ static uint32_t kRed = BE(0xFF6450FF), //255, 100, 80
[fLightGrayGradient fillRect: noIncludeRect angle: -90];
}
if (leftWidth > 0)
if (rightWidth > 0)
{
NSRect includeRect = barRect;
includeRect.origin.x += leftWidth;