| 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 9c1dd58e4a23f19d72e143276491ca723b9e41d1..bb945ab52c6e52e7fa49f6f4469cdaeab3efc488 100644
|
| --- a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm
|
| +++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm
|
| @@ -54,6 +54,17 @@ const int kDefaultFontSize = 12;
|
| return l10n_util::GetNSString(IDS_ACCNAME_BOOKMARKS_CHEVRON);
|
| }
|
|
|
| +- (NSRect)imageRectForBounds:(NSRect)theRect {
|
| + NSRect imageRect = [super imageRectForBounds:theRect];
|
| + if (ui::MaterialDesignController::IsModeMaterial()) {
|
| + // Make sure the chevron icon stays centered. Normally a bookmark bar item
|
| + // with no label has its icon placed at a fixed x-position.
|
| + CGFloat totalWidth = NSMaxX(theRect);
|
| + imageRect.origin.x = (totalWidth - [self image].size.width) / 2;
|
| + }
|
| + return imageRect;
|
| +}
|
| +
|
| @end
|
|
|
| @interface BookmarkButtonCell(Private)
|
|
|