summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/bookmark_button_cell.mm
diff options
context:
space:
mode:
authorjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-16 22:57:28 +0000
committerjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-16 22:57:28 +0000
commitb3c064c2338e88a6ecfef7454bc3301d643a91fe (patch)
tree20c118579299896e7497ca99094cc6e0b5f8fedd /chrome/browser/cocoa/bookmark_button_cell.mm
parent21808a35f82ffcd3a71991f8841b27f90285f149 (diff)
downloadchromium_src-b3c064c2338e88a6ecfef7454bc3301d643a91fe.zip
chromium_src-b3c064c2338e88a6ecfef7454bc3301d643a91fe.tar.gz
chromium_src-b3c064c2338e88a6ecfef7454bc3301d643a91fe.tar.bz2
Fix left alignment of icons in bookmark button if title is "".
BUG=http://crbug.com/41690 TEST=\ Create a bookmark with an empty title. Add to subfolder. Open it --> see it left aligned. Review URL: http://codereview.chromium.org/1540040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44843 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/bookmark_button_cell.mm')
-rw-r--r--chrome/browser/cocoa/bookmark_button_cell.mm14
1 files changed, 2 insertions, 12 deletions
diff --git a/chrome/browser/cocoa/bookmark_button_cell.mm b/chrome/browser/cocoa/bookmark_button_cell.mm
index f769938..edae5f9 100644
--- a/chrome/browser/cocoa/bookmark_button_cell.mm
+++ b/chrome/browser/cocoa/bookmark_button_cell.mm
@@ -105,19 +105,9 @@
withString:@" "];
title = [title stringByReplacingOccurrencesOfString:@"\r"
withString:@" "];
- // Center the image if we have a title, or if there already was a
- // title set.
- BOOL hasTitle = (([title length] > 0) ||
- ([[self title] length] > 0));
- if (image) {
+ [self setImagePosition:NSImageLeft];
+ if (image)
[self setImage:image];
- if (hasTitle) {
- [self setImagePosition:NSImageLeft];
- } else {
- [self setImagePosition:NSImageOnly];
- }
- }
-
if (title)
[self setTitle:title];
}