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

Side by Side Diff: chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.cc

Issue 400693003: Fix the bounds of the extension action overflow menu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h" 5 #include "chrome/browser/ui/views/toolbar/extension_toolbar_menu_view.h"
6 6
7 #include "chrome/browser/ui/views/frame/browser_view.h" 7 #include "chrome/browser/ui/views/frame/browser_view.h"
8 #include "chrome/browser/ui/views/toolbar/browser_actions_container.h" 8 #include "chrome/browser/ui/views/toolbar/browser_actions_container.h"
9 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" 9 #include "chrome/browser/ui/views/toolbar/toolbar_view.h"
10 #include "ui/views/controls/menu/menu_item_view.h" 10 #include "ui/views/controls/menu/menu_item_view.h"
(...skipping 26 matching lines...) Expand all
37 if (sz.height() == 0) 37 if (sz.height() == 0)
38 return sz; 38 return sz;
39 39
40 sz.Enlarge(0, kVerticalPadding); 40 sz.Enlarge(0, kVerticalPadding);
41 return sz; 41 return sz;
42 } 42 }
43 43
44 void ExtensionToolbarMenuView::Layout() { 44 void ExtensionToolbarMenuView::Layout() {
45 // All buttons are given the same width. 45 // All buttons are given the same width.
46 gfx::Size sz = container_->GetPreferredSize(); 46 gfx::Size sz = container_->GetPreferredSize();
47 container_->SetBounds(views::MenuItemView::label_start(), 47 int height = sz.height() + kVerticalPadding / 2;
48 0, 48 SetBounds(views::MenuItemView::label_start(), 0, sz.width(), height);
49 sz.width(), 49 container_->SetBounds(0, 0, sz.width(), height);
50 sz.height() + (kVerticalPadding / 2));
51 } 50 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698