Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3728)

Unified Diff: chrome/browser/views/tabs/tab_renderer.cc

Issue 62064: UI font localization part 2 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/sad_tab_view.cc ('k') | chrome/common/gfx/chrome_font_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/tabs/tab_renderer.cc
===================================================================
--- chrome/browser/views/tabs/tab_renderer.cc (revision 13518)
+++ chrome/browser/views/tabs/tab_renderer.cc (working copy)
@@ -46,7 +46,7 @@
static const double kHoverOpacityVista = 0.7;
// TODO(beng): (Cleanup) This stuff should move onto the class.
-static ChromeFont title_font;
+static ChromeFont* title_font = NULL;
static int title_font_height = 0;
static SkBitmap* close_button_n = NULL;
static SkBitmap* close_button_h = NULL;
@@ -74,8 +74,8 @@
static bool initialized = false;
if (!initialized) {
ResourceBundle& rb = ResourceBundle::GetSharedInstance();
- title_font = rb.GetFont(ResourceBundle::BaseFont);
- title_font_height = title_font.height();
+ title_font = new ChromeFont(rb.GetFont(ResourceBundle::BaseFont));
+ title_font_height = title_font->height();
close_button_n = rb.GetBitmapNamed(IDR_TAB_CLOSE);
close_button_h = rb.GetBitmapNamed(IDR_TAB_CLOSE_H);
@@ -413,7 +413,7 @@
SkColor title_color = IsSelected() ? kSelectedTitleColor
: kUnselectedTitleColor;
- canvas->DrawStringInt(title, title_font, title_color, title_bounds_.x(),
+ canvas->DrawStringInt(title, *title_font, title_color, title_bounds_.x(),
title_bounds_.y(), title_bounds_.width(),
title_bounds_.height());
}
« no previous file with comments | « chrome/browser/views/sad_tab_view.cc ('k') | chrome/common/gfx/chrome_font_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698