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..e5985b9509d297ba7224aed7cd939849899e34e6 100644 |
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm |
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm |
@@ -118,12 +118,19 @@ |
withString:@" "]; |
title = [title stringByReplacingOccurrencesOfString:@"\r" |
withString:@" "]; |
- // 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 { |
+ // For bookmarks without a title that aren't visible directly in the |
+ // bookmarks bar, squeeze things tighter by displaying only the image. |
+ // By default, Cocoa leaves extra space in an attempt to display an |
+ // empty title. |
[self setImagePosition:NSImageOnly]; |
} |