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

Unified Diff: ios/chrome/browser/ui/autofill/cells/cvc_item.mm

Issue 2912863005: Use MDCTypography instead of MDFRobotoFontLoader directly. (Closed)
Patch Set: Revert main_controller Created 3 years, 7 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
Index: ios/chrome/browser/ui/autofill/cells/cvc_item.mm
diff --git a/ios/chrome/browser/ui/autofill/cells/cvc_item.mm b/ios/chrome/browser/ui/autofill/cells/cvc_item.mm
index 62de222a0cc6a2f4eeed3604343b08bce47f9033..4dfc14fca312d5fc1b58763394b821bfa50bc839 100644
--- a/ios/chrome/browser/ui/autofill/cells/cvc_item.mm
+++ b/ios/chrome/browser/ui/autofill/cells/cvc_item.mm
@@ -11,7 +11,7 @@
#import "ios/public/provider/chrome/browser/chrome_browser_provider.h"
#import "ios/public/provider/chrome/browser/ui/text_field_styling.h"
#import "ios/third_party/material_components_ios/src/components/Palettes/src/MaterialPalettes.h"
-#import "ios/third_party/material_roboto_font_loader_ios/src/src/MaterialRobotoFontLoader.h"
+#import "ios/third_party/material_components_ios/src/components/Typography/src/MaterialTypography.h"
#include "ui/base/l10n/l10n_util.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
@@ -116,8 +116,7 @@ const CGFloat kCVCTextFieldWidth = 60;
UIView* contentView = self.contentView;
_instructionsTextLabel = [[UILabel alloc] init];
- _instructionsTextLabel.font =
- [[MDFRobotoFontLoader sharedInstance] mediumFontOfSize:14];
+ _instructionsTextLabel.font = [MDCTypography body2Font];
_instructionsTextLabel.textColor = [[MDCPalette greyPalette] tint500];
_instructionsTextLabel.numberOfLines = 0;
_instructionsTextLabel.lineBreakMode = NSLineBreakByWordWrapping;
@@ -125,8 +124,7 @@ const CGFloat kCVCTextFieldWidth = 60;
[contentView addSubview:_instructionsTextLabel];
_errorLabel = [[UILabel alloc] init];
- _errorLabel.font =
- [[MDFRobotoFontLoader sharedInstance] regularFontOfSize:12];
+ _errorLabel.font = [MDCTypography captionFont];
_errorLabel.textColor = [[MDCPalette cr_redPalette] tint500];
_errorLabel.numberOfLines = 0;
_errorLabel.lineBreakMode = NSLineBreakByWordWrapping;
@@ -179,8 +177,7 @@ const CGFloat kCVCTextFieldWidth = 60;
[_CVCContainerView addSubview:_CVCImageView];
_buttonForNewCard = [UIButton buttonWithType:UIButtonTypeCustom];
- _buttonForNewCard.titleLabel.font =
- [[MDFRobotoFontLoader sharedInstance] regularFontOfSize:12];
+ _buttonForNewCard.titleLabel.font = [MDCTypography captionFont];
[_buttonForNewCard
setTitle:l10n_util::GetNSString(IDS_AUTOFILL_CARD_UNMASK_NEW_CARD_LINK)
forState:UIControlStateNormal];

Powered by Google App Engine
This is Rietveld 408576698