summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-06 19:28:16 +0000
committerjhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-06 19:28:16 +0000
commit9bd95f9f3a10790bce2c0c1993a138f463d45a5c (patch)
tree623863f771b84b1375f982d94f9dfacf1fe7b5e5 /chrome/browser
parent06d58e095785edfe461dc7cbe8aa80aee72f59de (diff)
downloadchromium_src-9bd95f9f3a10790bce2c0c1993a138f463d45a5c.zip
chromium_src-9bd95f9f3a10790bce2c0c1993a138f463d45a5c.tar.gz
chromium_src-9bd95f9f3a10790bce2c0c1993a138f463d45a5c.tar.bz2
Fix the positioning of the title in TabRendererGtk now that ChromeCanvas text rendering is fixed.
TBR=deanm Review URL: http://codereview.chromium.org/62066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13175 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/gtk/tabs/tab_renderer_gtk.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc
index 958dadd..9bbf1fd 100644
--- a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc
+++ b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc
@@ -289,16 +289,15 @@ void TabRendererGtk::Layout() {
// Size the Title text to fill the remaining space.
int title_left = favicon_bounds_.right() + kFavIconTitleSpacing;
- int title_top = kTopPadding + (bounds_.height() + title_font_height_) / 2;
+ 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.
gfx::Size minimum_size = GetMinimumUnselectedSize();
int text_height = title_top + title_font_height_ + kBottomPadding;
- if (text_height > minimum_size.height()) {
+ if (text_height > minimum_size.height())
title_top -= (text_height - minimum_size.height()) / 2;
- }
int title_width;
if (close_button_bounds_.width() && close_button_bounds_.height()) {