diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-31 06:42:06 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-31 06:42:06 +0000 |
commit | c761fa9ffa908f1a51310d69a8b8fbb41ce65eb2 (patch) | |
tree | d180266ed3553b9781053b43de0853e3c7574351 /chrome/browser/gtk/tabs | |
parent | 9efc74c5259dadedf092936cbb7d43cd398e8e1a (diff) | |
download | chromium_src-c761fa9ffa908f1a51310d69a8b8fbb41ce65eb2.zip chromium_src-c761fa9ffa908f1a51310d69a8b8fbb41ce65eb2.tar.gz chromium_src-c761fa9ffa908f1a51310d69a8b8fbb41ce65eb2.tar.bz2 |
gtk: Get rid of the title-centering code in TabRendererGtk. DrawStringInt centers the text for us already. This change also removes a hack that modified the clipping rect unnecessarily.
BUG=20401,20610
TEST=none
Review URL: http://codereview.chromium.org/179037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24875 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/tabs')
-rw-r--r-- | chrome/browser/gtk/tabs/tab_renderer_gtk.cc | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc index 1c97373..849ca4a 100644 --- a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc +++ b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc @@ -606,14 +606,7 @@ void TabRendererGtk::Layout() { if (!is_pinned() || width() >= kPinnedTabRendererAsTabWidth) { // Size the Title text to fill the remaining space. int title_left = favicon_bounds_.right() + kFavIconTitleSpacing; - // Center of the text in the content area. - int center_of_text = kTopPadding + (content_height / 2); - // Distance between the top of the text and the middle of the text. - // (This should actually be fTop - fAscent / 2, but we can't access fTop - // here so this is as close as we can get.) - int title_offset = title_font_height_ - title_font_->baseline() / 2; - // Top of the text. - int title_top = center_of_text - title_offset; + int title_top = kTopPadding; // 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 |