diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-22 22:00:09 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-22 22:00:09 +0000 |
commit | bd5a00a743c92290ec01d6ea603a5fd96098093e (patch) | |
tree | e2db07ba7b8f7e75911e5dede215bb9551216450 /chrome/browser/views/location_bar_view.cc | |
parent | a26b7d4950c1e684ab1620674a335ff3a27eda5c (diff) | |
download | chromium_src-bd5a00a743c92290ec01d6ea603a5fd96098093e.zip chromium_src-bd5a00a743c92290ec01d6ea603a5fd96098093e.tar.gz chromium_src-bd5a00a743c92290ec01d6ea603a5fd96098093e.tar.bz2 |
Resize and overflow for browser actions (part 1).
This changelist implements the following:
- A resize gripper and chevron in the browser action container
- Overflow when icons don't fit
- Snap to multiple of icon size (no excess pixels)
- Animation when resizing container / adding&removing icons (disable, enable).
- Persists the last width of the browser action container.
Known issues:
- No menu (yes, the chevron button doesn't do anything yet).
BUG=32101
TEST=Install and uninstall browser actions & make sure install bubble appears in
the right location. Make sure browser action container does not expand if
chevron is showing when you add browser action. Make sure container loses
chevron when no overflow occurs. Make sure browser action icons never disappear
due to shrinking when you release the mouse (when resizing). Make sure snapping
works.
Review URL: http://codereview.chromium.org/553039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36905 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/location_bar_view.cc')
-rw-r--r-- | chrome/browser/views/location_bar_view.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/views/location_bar_view.cc b/chrome/browser/views/location_bar_view.cc index e7a85f3..03a17f9 100644 --- a/chrome/browser/views/location_bar_view.cc +++ b/chrome/browser/views/location_bar_view.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -354,6 +354,7 @@ views::View* LocationBarView::GetPageActionView( } return NULL; } + gfx::Size LocationBarView::GetPreferredSize() { return gfx::Size(0, (popup_window_mode_ ? kPopupBackground : kBackground)->height()); @@ -1372,7 +1373,7 @@ bool LocationBarView::PageActionImageView::OnMousePressed( button = 2; } else if (event.IsRightMouseButton()) { // Get the top left point of this button in screen coordinates. - gfx::Point point = gfx::Point(0,0); + gfx::Point point = gfx::Point(0, 0); ConvertPointToScreen(this, &point); // Make the menu appear below the button. |