diff --git a/macosx/Torrent.m b/macosx/Torrent.m index 7b54618c6..dcdc569f7 100644 --- a/macosx/Torrent.m +++ b/macosx/Torrent.m @@ -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; diff --git a/macosx/TorrentCell.m b/macosx/TorrentCell.m index 20953351a..88c66fe83 100644 --- a/macosx/TorrentCell.m +++ b/macosx/TorrentCell.m @@ -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;