diff options
author | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-30 01:32:58 +0000 |
---|---|---|
committer | beng@google.com <beng@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-30 01:32:58 +0000 |
commit | aaeb9dc745d49afa66c1b613daa5a3123f309955 (patch) | |
tree | b08f301ef7b74b9268dc403da0a5dfbc0a64514c /chrome | |
parent | 6938aeec058cfe1b2a83c2192fd41dfbdfd06e4b (diff) | |
download | chromium_src-aaeb9dc745d49afa66c1b613daa5a3123f309955.zip chromium_src-aaeb9dc745d49afa66c1b613daa5a3123f309955.tar.gz chromium_src-aaeb9dc745d49afa66c1b613daa5a3123f309955.tar.bz2 |
Fix one more glitch when drag-attaching a tab to the tabstrip. Other tabs in the strip were instantly sized to their start size for the insert tab animation (which is their current size) but this calculation didn't take into account the fact that a newly inserted tab has a minimum size so their initial size isn't just the width / n other tabs, it's (width / n other tabs) - (min width / n other tabs)
B=1285677
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/tabs/tab_strip.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/tabs/tab_strip.cc b/chrome/browser/tabs/tab_strip.cc index 504cd0c..e3755a4 100644 --- a/chrome/browser/tabs/tab_strip.cc +++ b/chrome/browser/tabs/tab_strip.cc @@ -166,6 +166,14 @@ class TabStrip::TabAnimation : public AnimationDelegate { void GenerateStartAndEndWidths(int start_tab_count, int end_tab_count) { tabstrip_->GetDesiredTabWidths(start_tab_count, &start_unselected_width_, &start_selected_width_); + double standard_tab_width = + static_cast<double>(TabRenderer::GetStandardSize().width()); + if (start_tab_count < end_tab_count && + start_unselected_width_ < standard_tab_width) { + double minimum_tab_width = + static_cast<double>(TabRenderer::GetMinimumSize().width()); + start_unselected_width_ -= minimum_tab_width / start_tab_count; + } tabstrip_->GenerateIdealBounds(); tabstrip_->GetDesiredTabWidths(end_tab_count, &end_unselected_width_, |