| Index: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
|
| diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
|
| index 7d7fbb00e0956df4ffde9037ba63fe81d09204e8..0c128366318c14b38c1e73bafd95c21134488bcf 100644
|
| --- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
|
| +++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
|
| @@ -124,25 +124,12 @@
|
|
|
| NSRect GetFirstButtonFrameForHeight(CGFloat height) {
|
| CGFloat y = height - bookmarks::kBookmarkFolderButtonHeight -
|
| - bookmarks::BookmarkTopVerticalPadding();
|
| + bookmarks::BookmarkVerticalPadding();
|
| return NSMakeRect(0, y, bookmarks::kDefaultBookmarkWidth,
|
| bookmarks::kBookmarkFolderButtonHeight);
|
| }
|
|
|
| } // namespace
|
| -
|
| -namespace bookmarks {
|
| -
|
| -CGFloat BookmarkTopVerticalPadding() {
|
| - return bookmarks::BookmarkVerticalPadding();
|
| -}
|
| -
|
| -CGFloat BookmarkBottomVerticalPadding() {
|
| - return ui::MaterialDesignController::IsModeMaterial()
|
| - ? 0 : bookmarks::BookmarkVerticalPadding();
|
| -}
|
| -
|
| -} // bookmarks
|
|
|
|
|
| // Required to set the right tracking bounds for our fake menus.
|
| @@ -565,15 +552,14 @@
|
| } else {
|
| // Parent is a folder: expose as much as we can vertically; grow right/left.
|
| newWindowTopLeft.x = [self childFolderWindowLeftForWidth:windowWidth];
|
| - NSPoint topOfWindow =
|
| - NSMakePoint(0, NSMaxY([parentButton_ frame]) -
|
| - bookmarks::BookmarkTopVerticalPadding());
|
| + NSPoint topOfWindow = NSMakePoint(0,
|
| + NSMaxY([parentButton_ frame]) -
|
| + bookmarks::BookmarkVerticalPadding());
|
| topOfWindow = ui::ConvertPointFromWindowToScreen(
|
| [parentButton_ window],
|
| [[parentButton_ superview] convertPoint:topOfWindow toView:nil]);
|
| newWindowTopLeft.y = topOfWindow.y +
|
| - bookmarks::BookmarkTopVerticalPadding() +
|
| - bookmarks::BookmarkBottomVerticalPadding();
|
| + 2 * bookmarks::BookmarkVerticalPadding();
|
| }
|
| return newWindowTopLeft;
|
| }
|
| @@ -588,8 +574,7 @@
|
| // This does not take into account any padding which may be required at the
|
| // top and/or bottom of the window.
|
| return (buttonCount * bookmarks::kBookmarkFolderButtonHeight) +
|
| - bookmarks::BookmarkTopVerticalPadding() +
|
| - bookmarks::BookmarkBottomVerticalPadding();
|
| + 2 * bookmarks::BookmarkVerticalPadding();
|
| }
|
|
|
| - (void)adjustWindowLeft:(CGFloat)windowLeft
|
| @@ -1761,7 +1746,7 @@
|
| [buttons_ objectAtIndex:static_cast<NSUInteger>(destIndex)];
|
| DCHECK(button);
|
| NSRect buttonFrame = [button frame];
|
| - y = NSMaxY(buttonFrame) + 0.5 * bookmarks::BookmarkTopVerticalPadding();
|
| + y = NSMaxY(buttonFrame) + 0.5 * bookmarks::BookmarkVerticalPadding();
|
|
|
| // If it's a drop at the end (past the last button, if there are any) ...
|
| } else if (destIndex == numButtons) {
|
| @@ -1772,8 +1757,7 @@
|
| [buttons_ objectAtIndex:static_cast<NSUInteger>(destIndex - 1)];
|
| DCHECK(button);
|
| NSRect buttonFrame = [button frame];
|
| - y = buttonFrame.origin.y -
|
| - 0.5 * bookmarks::BookmarkBottomVerticalPadding();
|
| + y = buttonFrame.origin.y - 0.5 * bookmarks::BookmarkVerticalPadding();
|
|
|
| }
|
| } else {
|
|
|