| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/content_suggestions/cells/content_suggestions_art
icle_item.h" | 5 #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_art
icle_item.h" |
| 6 | 6 |
| 7 #include "base/time/time.h" | 7 #include "base/time/time.h" |
| 8 #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h" | 8 #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h" |
| 9 #import "ios/chrome/browser/ui/favicon/favicon_attributes.h" | 9 #import "ios/chrome/browser/ui/favicon/favicon_attributes.h" |
| 10 #import "ios/chrome/browser/ui/favicon/favicon_view.h" | 10 #import "ios/chrome/browser/ui/favicon/favicon_view.h" |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 _imageContainer.backgroundColor = | 166 _imageContainer.backgroundColor = |
| 167 [UIColor colorWithWhite:kNoImageBackgroundWhite alpha:1]; | 167 [UIColor colorWithWhite:kNoImageBackgroundWhite alpha:1]; |
| 168 _noImageIcon.image = [[UIImage imageNamed:kNoImageIconName] | 168 _noImageIcon.image = [[UIImage imageNamed:kNoImageIconName] |
| 169 imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; | 169 imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; |
| 170 [_noImageIcon | 170 [_noImageIcon |
| 171 setTintColor:[UIColor colorWithWhite:kNoImageIconWhite alpha:1]]; | 171 setTintColor:[UIColor colorWithWhite:kNoImageIconWhite alpha:1]]; |
| 172 | 172 |
| 173 _titleLabel.font = [MDCTypography subheadFont]; | 173 _titleLabel.font = [MDCTypography subheadFont]; |
| 174 _subtitleLabel.font = [MDCTypography body1Font]; | 174 _subtitleLabel.font = [MDCTypography body1Font]; |
| 175 _publisherLabel.font = [MDCTypography captionFont]; | 175 _publisherLabel.font = [MDCTypography captionFont]; |
| 176 _faviconView.font = | 176 _faviconView.font = [[MDCTypography fontLoader] mediumFontOfSize:10]; |
| 177 [[MDCTypography fontLoader] regularFontOfSize:kFaviconSize / 2]; | |
| 178 | 177 |
| 179 _subtitleLabel.textColor = [[MDCPalette greyPalette] tint700]; | 178 _subtitleLabel.textColor = [[MDCPalette greyPalette] tint700]; |
| 180 _publisherLabel.textColor = [[MDCPalette greyPalette] tint700]; | 179 _publisherLabel.textColor = [[MDCPalette greyPalette] tint700]; |
| 181 | 180 |
| 182 [self applyConstraints]; | 181 [self applyConstraints]; |
| 183 } | 182 } |
| 184 return self; | 183 return self; |
| 185 } | 184 } |
| 186 | 185 |
| 187 - (void)setContentImage:(UIImage*)image { | 186 - (void)setContentImage:(UIImage*)image { |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 @"title" : _titleLabel, | 297 @"title" : _titleLabel, |
| 299 @"text" : _subtitleLabel, | 298 @"text" : _subtitleLabel, |
| 300 @"publish" : _publisherLabel, | 299 @"publish" : _publisherLabel, |
| 301 @"favicon" : _faviconView, | 300 @"favicon" : _faviconView, |
| 302 }, | 301 }, |
| 303 @{ @"space" : @(kStandardSpacing), | 302 @{ @"space" : @(kStandardSpacing), |
| 304 @"small" : @(kSmallSpacing) }); | 303 @"small" : @(kSmallSpacing) }); |
| 305 } | 304 } |
| 306 | 305 |
| 307 @end | 306 @end |
| OLD | NEW |