Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5083)

Unified Diff: chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.cc

Issue 399173004: Adjust BrowserActionsContainer drag and drop to work for overflow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/toolbar/browser_actions_container.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.cc
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 49e4ec823d74ddfe9550a889f21684fe2974ece0..94adeb1244953afc78f2fb0e638595674f5bb20c 100644
--- a/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.cc
+++ b/chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.cc
@@ -10,15 +10,6 @@
#include "chrome/browser/ui/views/toolbar/wrench_menu.h"
#include "ui/views/controls/menu/menu_item_view.h"
-namespace {
-
-// Bottom padding to make sure we have enough room for the icons.
-// TODO(devlin): Figure out why the bottom few pixels of the last row in the
-// overflow menu are cut off (so we can remove this).
-const int kVerticalPadding = 8;
-
-} // namespace
-
ExtensionToolbarMenuView::ExtensionToolbarMenuView(Browser* browser,
WrenchMenu* wrench_menu)
: browser_(browser),
@@ -47,20 +38,14 @@ ExtensionToolbarMenuView::~ExtensionToolbarMenuView() {
}
gfx::Size ExtensionToolbarMenuView::GetPreferredSize() const {
- gfx::Size sz = container_->GetPreferredSize();
- if (sz.height() == 0)
- return sz;
-
- sz.Enlarge(0, kVerticalPadding);
- return sz;
+ return container_->GetPreferredSize();
}
void ExtensionToolbarMenuView::Layout() {
// All buttons are given the same width.
- gfx::Size sz = container_->GetPreferredSize();
- int height = sz.height() + kVerticalPadding / 2;
- SetBounds(views::MenuItemView::label_start(), 0, sz.width(), height);
- container_->SetBounds(0, 0, sz.width(), height);
+ gfx::Size sz = GetPreferredSize();
+ SetBounds(views::MenuItemView::label_start(), 0, sz.width(), sz.height());
+ container_->SetBounds(0, 0, sz.width(), sz.height());
}
void ExtensionToolbarMenuView::OnBrowserActionDragDone() {
« no previous file with comments | « chrome/browser/ui/views/toolbar/browser_actions_container.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698