Changeset 9488
- Timestamp:
- Nov 7, 2009, 4:08:42 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/TorrentCell.m
r9487 r9488 630 630 } 631 631 632 if (![torrent allDownloaded]) 633 { 634 const CGFloat widthRemaining = floorf(NSWidth(barRect) * [torrent progressLeft]); 635 636 NSRect wantedRect; 637 NSDivideRect(missingRect, &wantedRect, &missingRect, widthRemaining, NSMinXEdge); 638 639 //not-available section 640 if ([torrent isActive] && ![torrent isChecking] && [fDefaults boolForKey: @"DisplayProgressBarAvailable"] 641 && [torrent availableDesired] < 1.0) 642 { 643 NSRect unavailableRect; 644 NSDivideRect(wantedRect, &wantedRect, &unavailableRect, floorf(NSWidth(wantedRect) * [torrent availableDesired]), 645 NSMinXEdge); 646 647 [[ProgressGradients progressRedGradient] drawInRect: unavailableRect angle: 90]; 648 } 649 650 //remaining section 651 [[ProgressGradients progressWhiteGradient] drawInRect: wantedRect angle: 90]; 652 } 653 654 //unwanted section 632 655 if (!NSIsEmptyRect(missingRect)) 633 {634 if (![torrent allDownloaded])635 {636 const CGFloat widthRemaining = floorf(NSWidth(barRect) * [torrent progressLeft]);637 638 NSRect wantedRect;639 NSDivideRect(missingRect, &wantedRect, &missingRect, widthRemaining, NSMinXEdge);640 641 //not-available section642 if ([torrent isActive] && ![torrent isChecking] && [fDefaults boolForKey: @"DisplayProgressBarAvailable"]643 && [torrent availableDesired] > 0.0)644 {645 NSRect unavailableRect;646 NSDivideRect(wantedRect, &wantedRect, &unavailableRect, floorf([torrent availableDesired] * NSWidth(wantedRect)),647 NSMinXEdge);648 649 [[ProgressGradients progressRedGradient] drawInRect: unavailableRect angle: 90];650 }651 652 //remaining section653 [[ProgressGradients progressWhiteGradient] drawInRect: wantedRect angle: 90];654 }655 656 //unwanted section657 656 [[ProgressGradients progressLightGrayGradient] drawInRect: missingRect angle: 90]; 658 }659 657 } 660 658
Note: See TracChangeset
for help on using the changeset viewer.