Commit 12b5c9b2 authored by Trent Apted's avatar Trent Apted Committed by Commit Bot

Use the same max-width for Bookmarks folders and the Bookmarks submenu.

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/1215503Reviewed-by: default avatarAllen Bauer <kylixrd@chromium.org>
Commit-Queue: Trent Apted <tapted@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590191}
parent 0e1cf9ac
...@@ -945,8 +945,10 @@ int AppMenu::GetDragOperations(MenuItemView* sender) { ...@@ -945,8 +945,10 @@ int AppMenu::GetDragOperations(MenuItemView* sender) {
} }
int AppMenu::GetMaxWidthForMenu(MenuItemView* menu) { 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 bookmark_menu_delegate_->GetMaxWidthForMenu(menu);
}
return MenuDelegate::GetMaxWidthForMenu(menu); return MenuDelegate::GetMaxWidthForMenu(menu);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment