summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-07 20:03:40 +0000
committertony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-07 20:03:40 +0000
commit05adb233720bd22661f602bf2bde0285df22db95 (patch)
tree118349478156979ea0dead606d757d7b79bd8771
parente7d3989475c007672e11b5612203fe5c849fb76e (diff)
downloadchromium_src-05adb233720bd22661f602bf2bde0285df22db95.zip
chromium_src-05adb233720bd22661f602bf2bde0285df22db95.tar.gz
chromium_src-05adb233720bd22661f602bf2bde0285df22db95.tar.bz2
Fix the tab move animation when the custom frame is on. Previously,
we were using the tab's y position which takes into account the custom frame padding. However, TabBounds is relative to the tabstrip origin so the we kept incrementing the y position by 15px at each step of the animation. Use the original tab bound y instead (matches code in the pin tab animation). TEST=open some tabs and use ctrl+shift+page{up,down} with the custom frame on. Review URL: http://codereview.chromium.org/269010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28298 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/gtk/tabs/tab_strip_gtk.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/gtk/tabs/tab_strip_gtk.cc
index 1c05649..5838633 100644
--- a/chrome/browser/gtk/tabs/tab_strip_gtk.cc
+++ b/chrome/browser/gtk/tabs/tab_strip_gtk.cc
@@ -418,7 +418,7 @@ class MoveTabAnimation : public TabStripGtk::TabAnimation {
double distance = start_tab_b_bounds_.x() - start_tab_a_bounds_.x();
double delta = distance * animation_.GetCurrentValue();
double new_x = start_tab_a_bounds_.x() + delta;
- gfx::Rect bounds(Round(new_x), tab_a_->y(), tab_a_->width(),
+ gfx::Rect bounds(Round(new_x), start_tab_a_bounds_.y(), tab_a_->width(),
tab_a_->height());
tabstrip_->SetTabBounds(tab_a_, bounds);
@@ -426,7 +426,7 @@ class MoveTabAnimation : public TabStripGtk::TabAnimation {
distance = start_tab_a_bounds_.x() - start_tab_b_bounds_.x();
delta = distance * animation_.GetCurrentValue();
new_x = start_tab_b_bounds_.x() + delta;
- bounds = gfx::Rect(Round(new_x), tab_b_->y(), tab_b_->width(),
+ bounds = gfx::Rect(Round(new_x), start_tab_b_bounds_.y(), tab_b_->width(),
tab_b_->height());
tabstrip_->SetTabBounds(tab_b_, bounds);
}