summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrdevlin.cronin@chromium.org <rdevlin.cronin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-17 23:56:32 +0000
committerrdevlin.cronin@chromium.org <rdevlin.cronin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-17 23:56:32 +0000
commiteedb03f474b82045f58e1bec4e94327c5a2e677f (patch)
tree0e391afcdcb324ecc1647a796f1eed29e5e14c04
parent7aadf7f44d042de6b30daa995c7be9d24ad3532d (diff)
downloadchromium_src-eedb03f474b82045f58e1bec4e94327c5a2e677f.zip
chromium_src-eedb03f474b82045f58e1bec4e94327c5a2e677f.tar.gz
chromium_src-eedb03f474b82045f58e1bec4e94327c5a2e677f.tar.bz2
Fix the bounds of the extension action overflow menu
The bounds of the ExtensionToolbarMenuView were different than that of the contained BrowserActionsContainer, so part of the BrowserActionsContainer was cut off. Fix this by setting the bounds of the MenuView to match those of the Container. Before: http://imgur.com/15oiD3G,04VAifx#0 After: http://imgur.com/15oiD3G,04VAifx#1 Blue is the ExtensionToolbarMenuView, Red is the BrowserActionsContainer. In the before, note that Browser Action VIII is missing (cut off). BUG=391280 Review URL: https://codereview.chromium.org/400693003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283932 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.cc b/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.cc
index ec259a9..e8a01e2 100644
--- a/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.cc
+++ b/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.cc
@@ -44,8 +44,7 @@ gfx::Size ExtensionToolbarMenuView::GetPreferredSize() const {
void ExtensionToolbarMenuView::Layout() {
// All buttons are given the same width.
gfx::Size sz = container_->GetPreferredSize();
- container_->SetBounds(views::MenuItemView::label_start(),
- 0,
- sz.width(),
- sz.height() + (kVerticalPadding / 2));
+ int height = sz.height() + kVerticalPadding / 2;
+ SetBounds(views::MenuItemView::label_start(), 0, sz.width(), height);
+ container_->SetBounds(0, 0, sz.width(), height);
}