| 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 51750aee4547586cafd743b3ef439a5a06348416..330f6547d4ebac50b962905be5e63bfe11e3e782 100644
|
| --- a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm
|
| +++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.mm
|
| @@ -47,6 +47,21 @@ const int kDefaultFontSize = 12;
|
| return YES;
|
| }
|
|
|
| +- (NSString*)accessibilityTitle {
|
| + 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)
|
|
|