Fix badge display for extension action overflow menu

BUG=393045

Review URL: https://codereview.chromium.org/387773002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282982 0039d316-1c4b-4281-b951-d872f2087c98
parent 6f172a77
...@@ -58,12 +58,6 @@ const int kItemSpacing = ToolbarView::kStandardSpacing; ...@@ -58,12 +58,6 @@ const int kItemSpacing = ToolbarView::kStandardSpacing;
// Horizontal spacing before the chevron (if visible). // Horizontal spacing before the chevron (if visible).
const int kChevronSpacing = kItemSpacing - 2; const int kChevronSpacing = kItemSpacing - 2;
// Padding to make sure the badge appears in the right location vertically when
// in overflow mode (inside the Chrome menu).
// TODO(devlin): Remove this hard coding and make sure the badge appears
// correctly.
const int kPaddingForBadge = 9;
// The maximum number of icons to show per row when in overflow mode (showing // The maximum number of icons to show per row when in overflow mode (showing
// icons in the application menu). // icons in the application menu).
// TODO(devlin): Compute the right number of icons to show, depending on the // TODO(devlin): Compute the right number of icons to show, depending on the
...@@ -359,10 +353,7 @@ void BrowserActionsContainer::Layout() { ...@@ -359,10 +353,7 @@ void BrowserActionsContainer::Layout() {
int x = (index * IconWidth(true)) - int x = (index * IconWidth(true)) -
(row_index * IconWidth(true) * kIconsPerMenuRow); (row_index * IconWidth(true) * kIconsPerMenuRow);
gfx::Rect rect_bounds( gfx::Rect rect_bounds(
x, x, IconHeight() * row_index, icon_width, IconHeight());
IconHeight() * row_index,
icon_width,
IconHeight() + kPaddingForBadge);
view->SetBoundsRect(rect_bounds); view->SetBoundsRect(rect_bounds);
view->SetVisible(true); view->SetVisible(true);
} }
......
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