Chromium Code Reviews| Index: chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm |
| diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm |
| index 392c7ca623d000ad1e3d3cd9f8c08cbf94c51ff2..cffe29f777acca3670ba164dc68343e9e983d0e5 100644 |
| --- a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm |
| +++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm |
| @@ -114,16 +114,16 @@ |
| - (void)setBookmarkCellText:(NSString*)title |
| image:(NSImage*)image { |
| - title = [title stringByReplacingOccurrencesOfString:@"\n" |
| - withString:@" "]; |
| - title = [title stringByReplacingOccurrencesOfString:@"\r" |
| - withString:@" "]; |
|
Ilya Sherman
2011/12/13 22:35:24
nit: For the sake of clarity when scanning the rev
KushalP
2011/12/13 22:51:31
As in a completely different commit to the repo? S
|
| - // If there is no title, squeeze things tight by displaying only the image; by |
| - // default, Cocoa leaves extra space in an attempt to display an empty title. |
| if ([title length]) { |
| [self setImagePosition:NSImageLeft]; |
| [self setTitle:title]; |
| + } else if ([self isFolderButtonCell]) { |
| + // Left-align icons for bookmarks within folders, regardless of whether |
| + // there is a title. |
| + [self setImagePosition:NSImageLeft]; |
| } else { |
| + // Only show the icon when there is no title and the cell is on the |
| + // bookmarks bar (directly) and not in a folder. |
|
Ilya Sherman
2011/12/13 22:35:24
nit: This comment is a little confusing, because i
|
| [self setImagePosition:NSImageOnly]; |
| } |