summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/download_shelf_view.cc
diff options
context:
space:
mode:
authorfinnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-21 23:51:23 +0000
committerfinnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-21 23:51:23 +0000
commitf376c0f4c84d20465fd3e8551f507707aa64679a (patch)
tree248318c2f639a21e7f15b99f038065e59c812314 /chrome/browser/views/download_shelf_view.cc
parent90540ea679834372a7a1f68fa2c8db2a4e56d7e5 (diff)
downloadchromium_src-f376c0f4c84d20465fd3e8551f507707aa64679a.zip
chromium_src-f376c0f4c84d20465fd3e8551f507707aa64679a.tar.gz
chromium_src-f376c0f4c84d20465fd3e8551f507707aa64679a.tar.bz2
Fixing various layout issues with the download shelf:
1) Bug 3424: If you download an EXE which takes a while to start and you switch tabs before it does, then when you come back to the tab it would truncate the dangerous download on the right because we have never cached the size of the label. We now perform a SizeLabelToMinWidth() in the constructor of DownloadItem for dangerous downloads to make sure the calculation has taken place when needed. 2) Bug 3424: Once I fixed the problem above, I also noticed that the Save and Discard buttons would not show since the cached button sizes are 0 because the view animation took place while the shelf was hidden (while the shelf had no parent). By triggering a Layout of the shelf after setting the bounds, this triggers the buttons to draw appropriately. 3) Bug 3459: The remaining work was to fix the truncation on the bottom of the dangerous download view by taking the size of the progress icon for non-dangerous downloads into account. Ideally, we should increase the size of a non-dangerous download view if the warning icon or the buttons on the dangerous download view cause the size to increase, but I find that unlikely and it should be easy to fix if we come across that. Review URL: http://codereview.chromium.org/7843 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3705 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/download_shelf_view.cc')
-rw-r--r--chrome/browser/views/download_shelf_view.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/views/download_shelf_view.cc b/chrome/browser/views/download_shelf_view.cc
index a857314..9a36ab5 100644
--- a/chrome/browser/views/download_shelf_view.cc
+++ b/chrome/browser/views/download_shelf_view.cc
@@ -182,7 +182,7 @@ void DownloadShelfView::AnimationProgressed(const Animation *animation) {
SchedulePaint();
} else if (animation == shelf_animation_.get()) {
// Force a re-layout of the parent, which will call back into
- // GetPreferredSize, where we will do our animation. In the case where the
+ // GetPreferredSize, where we will do our animation. In the case where the
// animation is hiding, we do a full resize - the fast resizing would
// otherwise leave blank white areas where the shelf was and where the
// user's eye is. Thankfully bottom-resizing is a lot faster than