Commit c245af46 authored by Gauthier Ambard's avatar Gauthier Ambard Committed by Commit Bot

[iOS] Use Dynamic Type in the empty NTP cell

This CL adds Dynamic Type to the cell displayed when the NTP's articles
section is empty.

Bug: 893527
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: If36d6ece1eaac888f606f7730de379aec11ba6be
Reviewed-on: https://chromium-review.googlesource.com/c/1273536
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: default avatarJustin Cohen <justincohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599144}
parent f32368f1
......@@ -6,8 +6,6 @@
#import "ios/chrome/browser/ui/collection_view/cells/collection_view_text_cell.h"
#import "ios/chrome/browser/ui/content_suggestions/identifier/content_suggestion_identifier.h"
#import "ios/third_party/material_components_ios/src/components/Palettes/src/MaterialPalettes.h"
#import "ios/third_party/material_components_ios/src/components/Typography/src/MaterialTypography.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
......@@ -59,16 +57,20 @@
// Configures the |textLabel|.
- (void)configureTextLabel:(UILabel*)textLabel {
textLabel.text = self.text;
textLabel.textColor = [[MDCPalette greyPalette] tint900];
textLabel.font = [MDCTypography body2Font];
textLabel.textColor = [UIColor colorWithWhite:0.13 alpha:1];
textLabel.font =
[UIFont preferredFontForTextStyle:UIFontTextStyleSubheadline];
textLabel.adjustsFontForContentSizeCategory = YES;
textLabel.numberOfLines = 0;
}
// Configures the |detailTextLabel|.
- (void)configureDetailTextLabel:(UILabel*)detailTextLabel {
detailTextLabel.text = self.detailText;
detailTextLabel.textColor = [[MDCPalette greyPalette] tint500];
detailTextLabel.font = [MDCTypography body1Font];
detailTextLabel.textColor = [UIColor colorWithWhite:0.62 alpha:1];
detailTextLabel.font =
[UIFont preferredFontForTextStyle:UIFontTextStyleFootnote];
detailTextLabel.adjustsFontForContentSizeCategory = YES;
detailTextLabel.numberOfLines = 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment