diff options
author | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-24 01:33:51 +0000 |
---|---|---|
committer | rafaelw@chromium.org <rafaelw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-24 01:33:51 +0000 |
commit | 3f96478ce556c0516f37b74b0f8b8e8c5cd49c96 (patch) | |
tree | aca903ce97a7e064a9c354a302e892d29dbf33b1 /chrome/browser/views | |
parent | dc788be43f838f277faa433a5699ee3107aff196 (diff) | |
download | chromium_src-3f96478ce556c0516f37b74b0f8b8e8c5cd49c96.zip chromium_src-3f96478ce556c0516f37b74b0f8b8e8c5cd49c96.tar.gz chromium_src-3f96478ce556c0516f37b74b0f8b8e8c5cd49c96.tar.bz2 |
Increase visual spacing between browser action buttons to 5px.
BUG=25444
Review URL: http://codereview.chromium.org/316019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29988 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r-- | chrome/browser/views/browser_actions_container.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/chrome/browser/views/browser_actions_container.cc b/chrome/browser/views/browser_actions_container.cc index 5dbf6ad..d21984b 100644 --- a/chrome/browser/views/browser_actions_container.cc +++ b/chrome/browser/views/browser_actions_container.cc @@ -30,6 +30,11 @@ static const int kButtonSize = 29; // The padding between the browser actions and the omnibox/page menu. static const int kHorizontalPadding = 4; +// The padding between browser action buttons. Visually, the actual number of +// empty (non-drawing) pixels is this value + 2 when adjacent browser icons +// use their maximum allowed size. +static const int kBrowserActionButtonPadding = 3; + // This is the same value from toolbar.cc. We position the browser actions // container flush with the edges of the toolbar as a special case so that we // can draw the badge outside the visual bounds of the container. @@ -340,13 +345,16 @@ gfx::Size BrowserActionsContainer::GetPreferredSize() { return gfx::Size(0, 0); int width = kHorizontalPadding * 2 + browser_action_views_.size() * kButtonSize; + if (browser_action_views_.size() > 1) + width += (browser_action_views_.size() - 1) * kBrowserActionButtonPadding; return gfx::Size(width, kButtonSize); } void BrowserActionsContainer::Layout() { for (size_t i = 0; i < browser_action_views_.size(); ++i) { BrowserActionView* view = browser_action_views_[i]; - int x = kHorizontalPadding + i * kButtonSize; + int x = kHorizontalPadding + + i * (kButtonSize + kBrowserActionButtonPadding); if (x + kButtonSize <= width()) { view->SetBounds(x, 0, kButtonSize, height()); view->SetVisible(true); |