summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/bookmark_bar_controller.mm
diff options
context:
space:
mode:
authorjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-30 16:50:52 +0000
committerjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-30 16:50:52 +0000
commit007ec446238760715c9666cb037044a16adb60ac (patch)
tree19f9c74509d69f90caa1ae1b75920f7020b0fe81 /chrome/browser/cocoa/bookmark_bar_controller.mm
parent86231c664472d3f0c04481df03bdd16b04c3dff2 (diff)
downloadchromium_src-007ec446238760715c9666cb037044a16adb60ac.zip
chromium_src-007ec446238760715c9666cb037044a16adb60ac.tar.gz
chromium_src-007ec446238760715c9666cb037044a16adb60ac.tar.bz2
Fix bookmark trimming.
BUG=http://crbug.com/22825 TEST=rename bookmarks to the following names; make sure the full name shows up (and not "t..."). test, FBL, Moma, SFGate Now rename a bookmark to "banana whamma fo famma me mi mo mamma banana" and make sure it is trimmed. Review URL: http://codereview.chromium.org/249038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27616 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/bookmark_bar_controller.mm')
-rw-r--r--chrome/browser/cocoa/bookmark_bar_controller.mm7
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/cocoa/bookmark_bar_controller.mm b/chrome/browser/cocoa/bookmark_bar_controller.mm
index 5f42443..b0f07dd 100644
--- a/chrome/browser/cocoa/bookmark_bar_controller.mm
+++ b/chrome/browser/cocoa/bookmark_bar_controller.mm
@@ -484,11 +484,12 @@ const CGFloat kBookmarkHorizontalPadding = 1.0;
}
// Return an appropriate width for the given bookmark button cell.
-// The "+1" is needed because, sometimes, Cocoa is off by one.
+// The "+2" is needed because, sometimes, Cocoa is off by a tad.
// Example: for a bookmark named "Moma" or "SFGate", it is one pixel
-// too small. For a bookmark named "SFGateFooWoo", it is just fine.
+// too small. For "FBL" it is 2 pixels too small.
+// For a bookmark named "SFGateFooWoo", it is just fine.
- (CGFloat)widthForBookmarkButtonCell:(NSCell*)cell {
- CGFloat desired = [cell cellSize].width + 1;
+ CGFloat desired = [cell cellSize].width + 2;
return std::min(desired, kDefaultBookmarkWidth);
}