Changeset 9492
- Timestamp:
- Nov 7, 2009, 11:20:41 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/macosx/TorrentCell.m
r9488 r9492 118 118 NSRect result = bounds; 119 119 result.origin.x += PADDING_HORIZONTAL; 120 result.origin.y += floor f((result.size.height - imageSize) * 0.5f);120 result.origin.y += floor((result.size.height - imageSize) * 0.5); 121 121 result.size = NSMakeSize(imageSize, imageSize); 122 122 … … 162 162 result.origin.y += PADDING_BETWEEN_TITLE_AND_PROGRESS + HEIGHT_STATUS + PADDING_BETWEEN_PROGRESS_AND_BAR; 163 163 164 result.size.width = round(NSMaxX(bounds) - result.origin.x - PADDING_HORIZONTAL - 2.0f* (PADDING_HORIZONTAL + NORMAL_BUTTON_WIDTH));164 result.size.width = floor(NSMaxX(bounds) - result.origin.x - PADDING_HORIZONTAL - 2.0 * (PADDING_HORIZONTAL + NORMAL_BUTTON_WIDTH)); 165 165 166 166 return result; … … 574 574 { 575 575 NSRect piecesBarRect, regularBarRect; 576 NSDivideRect(barRect, &piecesBarRect, ®ularBarRect, floor f(NSHeight(barRect) * PIECES_TOTAL_PERCENT * piecesBarPercent),576 NSDivideRect(barRect, &piecesBarRect, ®ularBarRect, floor(NSHeight(barRect) * PIECES_TOTAL_PERCENT * piecesBarPercent), 577 577 NSMaxYEdge); 578 578 … … 596 596 597 597 NSRect haveRect, missingRect; 598 NSDivideRect(barRect, &haveRect, &missingRect, floorf([torrent progress] * NSWidth(barRect)), NSMinXEdge);598 NSDivideRect(barRect, &haveRect, &missingRect, round([torrent progress] * NSWidth(barRect)), NSMinXEdge); 599 599 600 600 if (!NSIsEmptyRect(haveRect)) … … 607 607 { 608 608 NSRect ratioHaveRect, ratioRemainingRect; 609 NSDivideRect(haveRect, &ratioHaveRect, &ratioRemainingRect, floorf([torrent progressStopRatio] * NSWidth(haveRect)),609 NSDivideRect(haveRect, &ratioHaveRect, &ratioRemainingRect, round([torrent progressStopRatio] * NSWidth(haveRect)), 610 610 NSMinXEdge); 611 611 … … 632 632 if (![torrent allDownloaded]) 633 633 { 634 const CGFloat widthRemaining = floorf(NSWidth(barRect) * [torrent progressLeft]);634 const CGFloat widthRemaining = round(NSWidth(barRect) * [torrent progressLeft]); 635 635 636 636 NSRect wantedRect; … … 642 642 { 643 643 NSRect unavailableRect; 644 NSDivideRect(wantedRect, &wantedRect, &unavailableRect, floorf(NSWidth(wantedRect) * [torrent availableDesired]),644 NSDivideRect(wantedRect, &wantedRect, &unavailableRect, round(NSWidth(wantedRect) * [torrent availableDesired]), 645 645 NSMinXEdge); 646 646
Note: See TracChangeset
for help on using the changeset viewer.