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

Side by Side Diff: ios/chrome/browser/ui/settings/cells/copied_to_chrome_item.mm

Issue 2912863005: Use MDCTypography instead of MDFRobotoFontLoader directly. (Closed)
Patch Set: Tentative fix for ManualTextFramerTest Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/chrome/browser/ui/settings/cells/copied_to_chrome_item.h" 5 #import "ios/chrome/browser/ui/settings/cells/copied_to_chrome_item.h"
6 6
7 #include "components/strings/grit/components_strings.h" 7 #include "components/strings/grit/components_strings.h"
8 #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h" 8 #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h"
9 #include "ios/chrome/grit/ios_chromium_strings.h" 9 #include "ios/chrome/grit/ios_chromium_strings.h"
10 #import "ios/third_party/material_components_ios/src/components/Buttons/src/Mate rialButtons.h" 10 #import "ios/third_party/material_components_ios/src/components/Buttons/src/Mate rialButtons.h"
11 #import "ios/third_party/material_components_ios/src/components/Palettes/src/Mat erialPalettes.h" 11 #import "ios/third_party/material_components_ios/src/components/Palettes/src/Mat erialPalettes.h"
12 #import "ios/third_party/material_roboto_font_loader_ios/src/src/MaterialRobotoF ontLoader.h" 12 #import "ios/third_party/material_components_ios/src/components/Typography/src/M aterialTypography.h"
13 #include "ui/base/l10n/l10n_util_mac.h" 13 #include "ui/base/l10n/l10n_util_mac.h"
14 14
15 #if !defined(__has_feature) || !__has_feature(objc_arc) 15 #if !defined(__has_feature) || !__has_feature(objc_arc)
16 #error "This file requires ARC support." 16 #error "This file requires ARC support."
17 #endif 17 #endif
18 18
19 namespace { 19 namespace {
20 // Padding used on the leading and trailing edges of the cell. 20 // Padding used on the leading and trailing edges of the cell.
21 const CGFloat kHorizontalPadding = 16; 21 const CGFloat kHorizontalPadding = 16;
22 22
(...skipping 24 matching lines...) Expand all
47 UIView* contentView = self.contentView; 47 UIView* contentView = self.contentView;
48 48
49 _textLabel = [[UILabel alloc] init]; 49 _textLabel = [[UILabel alloc] init];
50 _textLabel.translatesAutoresizingMaskIntoConstraints = NO; 50 _textLabel.translatesAutoresizingMaskIntoConstraints = NO;
51 [contentView addSubview:_textLabel]; 51 [contentView addSubview:_textLabel];
52 52
53 _button = [[MDCFlatButton alloc] init]; 53 _button = [[MDCFlatButton alloc] init];
54 _button.translatesAutoresizingMaskIntoConstraints = NO; 54 _button.translatesAutoresizingMaskIntoConstraints = NO;
55 [contentView addSubview:_button]; 55 [contentView addSubview:_button];
56 56
57 _textLabel.font = 57 _textLabel.font = [[MDCTypography fontLoader] mediumFontOfSize:14];
58 [[MDFRobotoFontLoader sharedInstance] mediumFontOfSize:14];
59 _textLabel.textColor = [[MDCPalette greyPalette] tint900]; 58 _textLabel.textColor = [[MDCPalette greyPalette] tint900];
60 _textLabel.text = 59 _textLabel.text =
61 l10n_util::GetNSString(IDS_IOS_AUTOFILL_DESCRIBE_LOCAL_COPY); 60 l10n_util::GetNSString(IDS_IOS_AUTOFILL_DESCRIBE_LOCAL_COPY);
62 61
63 _button.customTitleColor = [[MDCPalette cr_bluePalette] tint600]; 62 _button.customTitleColor = [[MDCPalette cr_bluePalette] tint600];
64 [_button 63 [_button
65 setTitle:l10n_util::GetNSString(IDS_AUTOFILL_CLEAR_LOCAL_COPY_BUTTON) 64 setTitle:l10n_util::GetNSString(IDS_AUTOFILL_CLEAR_LOCAL_COPY_BUTTON)
66 forState:UIControlStateNormal]; 65 forState:UIControlStateNormal];
67 66
68 // Set up the constraints. 67 // Set up the constraints.
(...skipping 14 matching lines...) Expand all
83 } 82 }
84 83
85 - (void)prepareForReuse { 84 - (void)prepareForReuse {
86 [super prepareForReuse]; 85 [super prepareForReuse];
87 [self.button removeTarget:nil 86 [self.button removeTarget:nil
88 action:nil 87 action:nil
89 forControlEvents:UIControlEventAllEvents]; 88 forControlEvents:UIControlEventAllEvents];
90 } 89 }
91 90
92 @end 91 @end
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/settings/cells/card_multiline_item.mm ('k') | ios/chrome/browser/ui/settings/cells/encryption_item.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698