Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2147)

Unified Diff: chrome/browser/ui/cocoa/download/download_item_cell.mm

Issue 10545050: mac: Use NSWidth() and friends in a few more places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/download/download_item_cell.mm
diff --git a/chrome/browser/ui/cocoa/download/download_item_cell.mm b/chrome/browser/ui/cocoa/download/download_item_cell.mm
index a16eba9e1f389a71e1dcd9b20539735a635ebd97..a317c1d4986b99639ac0a6fde8c668b0bae7519b 100644
--- a/chrome/browser/ui/cocoa/download/download_item_cell.mm
+++ b/chrome/browser/ui/cocoa/download/download_item_cell.mm
@@ -390,7 +390,7 @@ using content::DownloadItem;
if (![self secondaryTitle] || statusAlpha_ <= 0)
return;
- CGFloat textWidth = innerFrame.size.width -
+ CGFloat textWidth = NSWidth(innerFrame) -
(kTextPosLeft + kTextPaddingRight + kDropdownAreaWidth);
NSString* secondaryText = [self elideStatus:textWidth];
NSColor* secondaryColor =
@@ -492,7 +492,7 @@ using content::DownloadItem;
- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView*)controlView {
// Draw title
- CGFloat textWidth = cellFrame.size.width -
+ CGFloat textWidth = NSWidth(cellFrame) -
(kTextPosLeft + kTextPaddingRight + kDropdownAreaWidth);
[self setTitle:[self elideTitle:textWidth]];

Powered by Google App Engine
This is Rietveld 408576698