diff options
author | yukishiino@chromium.org <yukishiino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-05 09:08:57 +0000 |
---|---|---|
committer | yukishiino@chromium.org <yukishiino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-05 09:08:57 +0000 |
commit | a464cc798130d851a1bb61d7b150fe4b9118d94d (patch) | |
tree | 623be7b784b208def809c6d392f642d94415a64f /ui/base | |
parent | 15f3429b40c9d2ef7face02955ab9d320dd1b93d (diff) | |
download | chromium_src-a464cc798130d851a1bb61d7b150fe4b9118d94d.zip chromium_src-a464cc798130d851a1bb61d7b150fe4b9118d94d.tar.gz chromium_src-a464cc798130d851a1bb61d7b150fe4b9118d94d.tar.bz2 |
Clean-up: Replaces obsolete Font/FontList methods.
Replaces obsolete methods of gfx::Font and gfx::FontList with new ones.
ui::ResourceBundle::SmallFont is equivalent to -1px to the default font. So, nothing changes.
BUG=265485
TEST=Run ui_unittests.
Review URL: https://codereview.chromium.org/152723002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@248938 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base')
-rw-r--r-- | ui/base/cocoa/controls/blue_label_button.mm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ui/base/cocoa/controls/blue_label_button.mm b/ui/base/cocoa/controls/blue_label_button.mm index cb85433..fad0a01 100644 --- a/ui/base/cocoa/controls/blue_label_button.mm +++ b/ui/base/cocoa/controls/blue_label_button.mm @@ -12,7 +12,6 @@ const CGFloat kCornerRadius = 2; -const CGFloat kButtonFontSizeDelta = -1; const CGFloat kTopBottomTextPadding = 7; const CGFloat kLeftRightTextPadding = 15; const SkColor kTextShadowColor = SkColorSetRGB(0x53, 0x8c, 0xea); @@ -54,8 +53,8 @@ const SkColor kPressOuterRingColor = SkColorSetRGB(0x23, 0x52, 0xa2); + (NSAttributedString*)generateAttributedString:(NSString*)buttonText { ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); - NSFont* buttonFont = rb.GetFont(ui::ResourceBundle::BaseFont). - DeriveFont(kButtonFontSizeDelta).GetNativeFont(); + NSFont* buttonFont = rb.GetFontList(ui::ResourceBundle::SmallFont). + GetPrimaryFont().GetNativeFont(); base::scoped_nsobject<NSMutableParagraphStyle> buttonTextParagraphStyle( [[NSMutableParagraphStyle alloc] init]); [buttonTextParagraphStyle setAlignment:NSCenterTextAlignment]; |