Fixing various layout issues with the download shelf:
commitf376c0f4c84d20465fd3e8551f507707aa64679a
authorfinnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 21 Oct 2008 23:51:23 +0000 (21 23:51 +0000)
committerfinnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 21 Oct 2008 23:51:23 +0000 (21 23:51 +0000)
tree248318c2f639a21e7f15b99f038065e59c812314
parent90540ea679834372a7a1f68fa2c8db2a4e56d7e5
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
chrome/browser/views/download_item_view.cc
chrome/browser/views/download_shelf_view.cc
chrome/browser/views/frame/browser_view2.cc