summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-05 20:33:58 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-05 20:33:58 +0000
commitc850c202013c1e237581e49404d6bc29a7726ac6 (patch)
tree1fe904f3e5d361dc6136762f84fe9a8b8b5b64c0
parentc125785e44a35b03ac1193c42328126b479352d3 (diff)
downloadchromium_src-c850c202013c1e237581e49404d6bc29a7726ac6.zip
chromium_src-c850c202013c1e237581e49404d6bc29a7726ac6.tar.gz
chromium_src-c850c202013c1e237581e49404d6bc29a7726ac6.tar.bz2
Use a font size of 9pt in the tab titles. This is a bit
bigger than before. This matches the font size used in Windows (the heights are the same), but on Linux, the text render a bit wider. BUG=17866 Review URL: http://codereview.chromium.org/160663 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22525 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/gtk/tabs/tab_renderer_gtk.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc
index c2c1bc5..7db36cb 100644
--- a/chrome/browser/gtk/tabs/tab_renderer_gtk.cc
+++ b/chrome/browser/gtk/tabs/tab_renderer_gtk.cc
@@ -543,9 +543,10 @@ 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 the mean line of the text in the content area.
- int title_top = kTopPadding +
- (content_height - title_font_->baseline()) / 2;
+ // Center the text in the content area. We need to shift the text up by a
+ // pixel to match Windows. TODO(estade): Figure out why we need to shift
+ // the text up by a pixel. http://crbug.com/18555
+ int title_top = kTopPadding + (content_height - title_font_height_) / 2 - 1;
// 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
@@ -888,9 +889,10 @@ void TabRendererGtk::InitResources() {
LoadTabImages();
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- // Force the font size to 8pt.
+ // Force the font size to 9pt, which matches Windows' default font size
+ // (taken from the system).
gfx::Font base_font = rb.GetFont(ResourceBundle::BaseFont);
- title_font_ = new gfx::Font(gfx::Font::CreateFont(base_font.FontName(), 8));
+ title_font_ = new gfx::Font(gfx::Font::CreateFont(base_font.FontName(), 9));
title_font_height_ = title_font_->height();
crashed_fav_icon = rb.GetBitmapNamed(IDR_SAD_FAVICON);