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..56b153d675c0c84770c8734ec2b5838ed7f6d3b4 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 kDisplayFontHeight = 15; |
Peter Kasting
2014/08/28 19:34:17
Where does this come from? Can we derive this fro
msw
2014/08/28 19:40:03
Was this height derived visually from the button a
noms (inactive)
2014/08/28 20:36:25
Hmm, it was, yes. Working on getting something bet
msw
2014/08/28 21:43:50
Give it a shot, I'd be okay with a literal (and a
noms (inactive)
2014/08/29 17:10:29
I went with adding a comment. Button height + inse
|
+ |
scoped_ptr<views::Border> CreateBorder(const int normal_image_set[], |
const int hot_image_set[], |
const int pushed_image_set[]) { |
@@ -59,6 +61,10 @@ NewAvatarButton::NewAvatarButton( |
gfx::ShadowValue(gfx::Point(), 1.0f, SK_ColorDKGRAY))); |
SetTextSubpixelRenderingEnabled(false); |
+ // Shrink large fonts to make them fit. |
+ SetFontList(GetFontList().GetLargestFontListWithHeightBound( |
+ kDisplayFontHeight)); |
+ |
ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance(); |
if (button_style == THEMED_BUTTON) { |
const int kNormalImageSet[] = IMAGE_GRID(IDR_AVATAR_THEMED_BUTTON_NORMAL); |