diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-22 00:34:08 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-22 00:34:08 +0000 |
commit | a02c37666ea431312f25cc8f5b98a895c4db4fd7 (patch) | |
tree | 75b3d96390113bc828c17a104dfcaf103dd54c8b | |
parent | 974c357413cbd98d7c542812a6f8b5b642761c4e (diff) | |
download | chromium_src-a02c37666ea431312f25cc8f5b98a895c4db4fd7.zip chromium_src-a02c37666ea431312f25cc8f5b98a895c4db4fd7.tar.gz chromium_src-a02c37666ea431312f25cc8f5b98a895c4db4fd7.tar.bz2 |
Fixes bug in tabstrip that could result in no tooltip text for pinned
tab. This happened because we weren't setting the title_bounds_, which
is used to determine if a tab should have tooltip text.
BUG=26079
TEST=see bug
Review URL: http://codereview.chromium.org/507062
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35122 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/views/tabs/tab_renderer.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/views/tabs/tab_renderer.cc b/chrome/browser/views/tabs/tab_renderer.cc index cdc1488..8d5a4a3 100644 --- a/chrome/browser/views/tabs/tab_renderer.cc +++ b/chrome/browser/views/tabs/tab_renderer.cc @@ -526,11 +526,10 @@ void TabRenderer::Layout() { close_button_->SetVisible(false); } + int title_left = favicon_bounds_.right() + kFavIconTitleSpacing; + int title_top = kTopPadding + (content_height - title_font_height) / 2; // Size the Title text to fill the remaining space. if (!pinned() || width() >= kPinnedTabRendererAsTabWidth) { - // Size the Title text to fill the remaining space. - int title_left = favicon_bounds_.right() + kFavIconTitleSpacing; - int title_top = kTopPadding + (content_height - title_font_height) / 2; // If the user has big fonts, the title will appear rendered too far down // on the y-axis if we use the regular top padding, so we need to adjust it // so that the text appears centered. @@ -548,6 +547,8 @@ void TabRenderer::Layout() { } title_bounds_.SetRect(title_left, title_top, title_width, title_font_height); + } else { + title_bounds_.SetRect(title_left, title_top, 0, 0); } // Certain UI elements within the Tab (the favicon, etc.) are not represented |