diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-15 21:38:07 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-15 21:38:07 +0000 |
commit | a9f8899794e8867395ad6665043ab02638e1d2c8 (patch) | |
tree | 8808ac965db53e10382e42151ea970788c2efea8 /chrome/browser/views/download_item_view.cc | |
parent | 8dde66528d2a057e087b4d3459e3323b0c65d5c5 (diff) | |
download | chromium_src-a9f8899794e8867395ad6665043ab02638e1d2c8.zip chromium_src-a9f8899794e8867395ad6665043ab02638e1d2c8.tar.gz chromium_src-a9f8899794e8867395ad6665043ab02638e1d2c8.tar.bz2 |
If there is not enough room in the download shelf to show a download, move the "show all download" link to the right to make it more visible that something happened.
This is a quick fix to mitigate the Malaysian case where the text is really long.
BUG=11816
TEST=Make sure download shelf still works as expected: download items still show and are animated. Dangerous downloads prompt for confirmation. If the browser window is too small, the download item is not shown and the link "Show all downloads" is displayed on the left.
Review URL: http://codereview.chromium.org/113417
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16191 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/download_item_view.cc')
-rw-r--r-- | chrome/browser/views/download_item_view.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/chrome/browser/views/download_item_view.cc b/chrome/browser/views/download_item_view.cc index 138158e..6ba34d7 100644 --- a/chrome/browser/views/download_item_view.cc +++ b/chrome/browser/views/download_item_view.cc @@ -404,8 +404,7 @@ void DownloadItemView::Layout() { y = (height() - button_size.height()) / 2; save_button_->SetBounds(x, y, button_size.width(), button_size.height()); x += button_size.width() + kButtonPadding; - discard_button_->SetBounds(x, y, button_size.width(), - button_size.height()); + discard_button_->SetBounds(x, y, button_size.width(), button_size.height()); } } @@ -873,7 +872,7 @@ gfx::Size DownloadItemView::GetButtonSize() { // not showing, the native buttons are not parented and their preferred size // is 0, messing-up the layout. if (cached_button_size_.width() != 0) - size = cached_button_size_; + return cached_button_size_; size = save_button_->GetMinimumSize(); gfx::Size discard_size = discard_button_->GetMinimumSize(); |