summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/tabs/tab_strip_gtk.cc
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-27 18:11:42 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-27 18:11:42 +0000
commit1bb81a4b7a25ed4c98468e138224bd6be50b348b (patch)
tree5bf43e0bb33cc0c8ae1be9ffe127141eced1a5f5 /chrome/browser/gtk/tabs/tab_strip_gtk.cc
parentacd6c2dcc66f5ddb5f0d73b48b200d3254a6a2d9 (diff)
downloadchromium_src-1bb81a4b7a25ed4c98468e138224bd6be50b348b.zip
chromium_src-1bb81a4b7a25ed4c98468e138224bd6be50b348b.tar.gz
chromium_src-1bb81a4b7a25ed4c98468e138224bd6be50b348b.tar.bz2
gtk: Subtract the tabstrip x offset from the last tab x offset when calculating the available tab width. The tabstrip and its tabs are not necessarily based at (0,0).
BUG=20329 TEST=Open many tabs until they resize smaller. Repeatedly close the left-most tab with the close button. The tabs should not resize at all until the mouse leaves the tabstrip. Review URL: http://codereview.chromium.org/173559 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24630 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/tabs/tab_strip_gtk.cc')
-rw-r--r--chrome/browser/gtk/tabs/tab_strip_gtk.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/gtk/tabs/tab_strip_gtk.cc b/chrome/browser/gtk/tabs/tab_strip_gtk.cc
index 30b4959..8db5a3f 100644
--- a/chrome/browser/gtk/tabs/tab_strip_gtk.cc
+++ b/chrome/browser/gtk/tabs/tab_strip_gtk.cc
@@ -1169,7 +1169,7 @@ int TabStripGtk::GetPinnedTabCount() const {
}
int TabStripGtk::GetAvailableWidthForTabs(TabGtk* last_tab) const {
- return last_tab->x() + last_tab->width();
+ return last_tab->x() - bounds_.x() + last_tab->width();
}
int TabStripGtk::GetIndexOfTab(const TabGtk* tab) const {