Skip to content

Commit

Permalink
Use the same max-width for Bookmarks folders and the Bookmarks submenu.
Browse files Browse the repository at this point in the history
The Chrome app menu and its submenus have a max-width of 800px. Bookmarks
_subfolders_ have a max-width of 400px. But this doesn't apply to the
bookmarks menu itself.

Currently if a bookmark has a long title and appears in the bookmarks
bar top-level, it will push out the width of the `Bookmarks` submenu
when accessed via the Chrome app menu to a width that feels inconsistent.

Bug: 881936
Change-Id: I1535b2b27f183e4106e21799ba91a5ab40287489
Reviewed-on: https://chromium-review.googlesource.com/1215503
Reviewed-by: Allen Bauer <[email protected]>
Commit-Queue: Trent Apted <[email protected]>
Cr-Commit-Position: refs/heads/master@{#590191}
  • Loading branch information
tapted authored and Commit Bot committed Sep 11, 2018
1 parent 0e1cf9a commit 12b5c9b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chrome/browser/ui/views/toolbar/app_menu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -945,8 +945,10 @@ int AppMenu::GetDragOperations(MenuItemView* sender) {
}

int AppMenu::GetMaxWidthForMenu(MenuItemView* menu) {
if (IsBookmarkCommand(menu->GetCommand()))
if (menu->GetCommand() == IDC_BOOKMARKS_MENU ||
IsBookmarkCommand(menu->GetCommand())) {
return bookmark_menu_delegate_->GetMaxWidthForMenu(menu);
}
return MenuDelegate::GetMaxWidthForMenu(menu);
}

Expand Down

0 comments on commit 12b5c9b

Please sign in to comment.