Index: chrome/browser/ui/views/profiles/new_avatar_button.cc |
diff --git a/chrome/browser/ui/views/profiles/new_avatar_button.cc b/chrome/browser/ui/views/profiles/new_avatar_button.cc |
index 99a62030508db329d3e8417a9fcc0b35cf0dbeee..eea2a1344814d2eda4a3075f17336b35d93a9321 100644 |
--- a/chrome/browser/ui/views/profiles/new_avatar_button.cc |
+++ b/chrome/browser/ui/views/profiles/new_avatar_button.cc |
@@ -18,6 +18,8 @@ |
namespace { |
+const int kDisplayFontSize = 13; |
+ |
scoped_ptr<views::Border> CreateBorder(const int normal_image_set[], |
const int hot_image_set[], |
const int pushed_image_set[]) { |
@@ -59,6 +61,14 @@ NewAvatarButton::NewAvatarButton( |
gfx::ShadowValue(gfx::Point(), 1.0f, SK_ColorDKGRAY))); |
SetTextSubpixelRenderingEnabled(false); |
+ // If the default font size is larger than the expected one, derive |
+ // the correct font size to match it. |
+ int font_size = GetFontList().GetFontSize(); |
+ if (font_size > kDisplayFontSize) { |
+ SetFontList(GetFontList().DeriveWithSizeDelta( |
msw
2014/08/25 19:17:20
I think we might need to use the font height inste
noms (inactive)
2014/08/25 19:19:36
I originally had the font height, but it didn't se
msw
2014/08/25 19:43:48
Unfortunately, what you had may have been "right".
noms (inactive)
2014/08/25 20:06:02
So what I had was:
const int kDisplayFontSize =
msw
2014/08/25 20:13:51
No, you can't interchange font height and size val
|
+ kDisplayFontSize - font_size - 1)); |
+ } |
+ |
ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance(); |
if (button_style == THEMED_BUTTON) { |
const int kNormalImageSet[] = IMAGE_GRID(IDR_AVATAR_THEMED_BUTTON_NORMAL); |