Chromium Code Reviews| Index: ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.mm |
| diff --git a/ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.mm b/ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.mm |
| index a01c7aef5f5201a5ca31f53d2c9140acf8bddc0c..f37615ddbc15c1632243067bc7d4990ba7c3ee3d 100644 |
| --- a/ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.mm |
| +++ b/ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.mm |
| @@ -5,8 +5,6 @@ |
| #import "ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.h" |
| #import "ios/chrome/browser/ui/collection_view/cells/collection_view_text_cell.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" |
| #if !defined(__has_feature) || !__has_feature(objc_arc) |
| #error "This file requires ARC support." |
| @@ -17,11 +15,7 @@ |
| @synthesize accessoryType = _accessoryType; |
| @synthesize text = _text; |
| @synthesize detailText = _detailText; |
| -@synthesize textFont = _textFont; |
| -@synthesize textColor = _textColor; |
| @synthesize numberOfTextLines = _numberOfTextLines; |
| -@synthesize detailTextFont = _detailTextFont; |
| -@synthesize detailTextColor = _detailTextColor; |
| @synthesize numberOfDetailTextLines = _numberOfDetailTextLines; |
| - (instancetype)initWithType:(NSInteger)type { |
| @@ -34,35 +28,6 @@ |
| return self; |
| } |
| -- (UIFont*)textFont { |
| - if (!_textFont) { |
| - _textFont = [[MDFRobotoFontLoader sharedInstance] mediumFontOfSize:14]; |
|
lpromero
2017/04/13 17:44:26
Instead of moving these defaults in all the View C
Moe
2017/04/13 18:48:58
If the VCs only override the properties, don't we
Moe
2017/04/13 19:33:38
Done.
lpromero
2017/04/13 20:24:55
It's sort of the point of having the default be li
|
| - } |
| - return _textFont; |
| -} |
| - |
| -- (UIColor*)textColor { |
| - if (!_textColor) { |
| - _textColor = [[MDCPalette greyPalette] tint900]; |
| - } |
| - return _textColor; |
| -} |
| - |
| -- (UIFont*)detailTextFont { |
| - if (!_detailTextFont) { |
| - _detailTextFont = |
| - [[MDFRobotoFontLoader sharedInstance] regularFontOfSize:14]; |
| - } |
| - return _detailTextFont; |
| -} |
| - |
| -- (UIColor*)detailTextColor { |
| - if (!_detailTextColor) { |
| - _detailTextColor = [[MDCPalette greyPalette] tint500]; |
| - } |
| - return _detailTextColor; |
| -} |
| - |
| #pragma mark CollectionViewItem |
| - (void)configureCell:(CollectionViewTextCell*)cell { |
| @@ -79,11 +44,7 @@ |
| } |
| // Styling. |
| - cell.textLabel.font = self.textFont; |
| - cell.textLabel.textColor = self.textColor; |
| cell.textLabel.numberOfLines = self.numberOfTextLines; |
| - cell.detailTextLabel.font = self.detailTextFont; |
| - cell.detailTextLabel.textColor = self.detailTextColor; |
| cell.detailTextLabel.numberOfLines = self.numberOfDetailTextLines; |
| } |