1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-10 14:13:23 +00:00

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; return [self haveVerified] + fStat->haveUnchecked;
} }
- (uint64_t) uploadedTotal
{
return fStat->uploadedEver;
}
- (uint64_t) downloadedTotal - (uint64_t) downloadedTotal
{ {
return fStat->downloadedEver; return fStat->downloadedEver;
} }
- (uint64_t) uploadedTotal
{
return fStat->uploadedEver;
}
- (uint64_t) failedHash - (uint64_t) failedHash
{ {
return fStat->corruptEver; return fStat->corruptEver;

View file

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