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

Unified Diff: ui/base/cocoa/controls/blue_label_button.mm

Issue 1689623004: Start removing enum ui::ResourceBundle::FontStyle, fix MacViews font sizes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix transcription error Created 4 years, 10 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 | « ui/base/BUILD.gn ('k') | ui/base/cocoa/menu_controller_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/cocoa/controls/blue_label_button.mm
diff --git a/ui/base/cocoa/controls/blue_label_button.mm b/ui/base/cocoa/controls/blue_label_button.mm
index 9d9b5805c9ca7c1c471751f2e58ead5f265c7059..37ecc8da0f2fcc1dea6f4e9dac61120ad4b3ea35 100644
--- a/ui/base/cocoa/controls/blue_label_button.mm
+++ b/ui/base/cocoa/controls/blue_label_button.mm
@@ -29,6 +29,8 @@ const SkColor kPressInnerRingColor = SkColorSetRGB(0x3f, 0x73, 0xcd);
const SkColor kOuterRingColor = SkColorSetRGB(0x2b, 0x67, 0xce);
const SkColor kPressOuterRingColor = SkColorSetRGB(0x23, 0x52, 0xa2);
+const int kFontSizeDelta = ui::ResourceBundle::kSmallFontDelta;
+
@interface BlueLabelButtonCell : NSButtonCell
+ (NSAttributedString*)generateAttributedString:(NSString*)buttonText;
@@ -54,8 +56,7 @@ const SkColor kPressOuterRingColor = SkColorSetRGB(0x23, 0x52, 0xa2);
+ (NSAttributedString*)generateAttributedString:(NSString*)buttonText {
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
- NSFont* buttonFont = rb.GetFontList(ui::ResourceBundle::SmallFont).
- GetPrimaryFont().GetNativeFont();
+ NSFont* buttonFont = rb.GetFontWithDelta(kFontSizeDelta).GetNativeFont();
base::scoped_nsobject<NSMutableParagraphStyle> buttonTextParagraphStyle(
[[NSMutableParagraphStyle alloc] init]);
[buttonTextParagraphStyle setAlignment:NSCenterTextAlignment];
« no previous file with comments | « ui/base/BUILD.gn ('k') | ui/base/cocoa/menu_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698