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

Unified Diff: ios/chrome/browser/ui/collection_view/cells/collection_view_text_cell.mm

Issue 2817953002: CollectionViewTextItem no longer styles CollectionViewTextCell (Closed)
Patch Set: rebase Created 3 years, 8 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/collection_view/cells/collection_view_text_cell.mm
diff --git a/ios/chrome/browser/ui/collection_view/cells/collection_view_text_cell.mm b/ios/chrome/browser/ui/collection_view/cells/collection_view_text_cell.mm
index 4b28223e83e774625332db10e950f00693b92c62..e7a685fe2da5cbe5b51f08753d4db7e6b807997a 100644
--- a/ios/chrome/browser/ui/collection_view/cells/collection_view_text_cell.mm
+++ b/ios/chrome/browser/ui/collection_view/cells/collection_view_text_cell.mm
@@ -4,6 +4,9 @@
#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_components_ios/src/components/Typography/src/MaterialTypography.h"
+
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
@@ -33,6 +36,12 @@ const CGFloat kMinimalHeight = 48;
_detailTextLabel.translatesAutoresizingMaskIntoConstraints = NO;
[containerView addSubview:_detailTextLabel];
+ // Set default font and text colors for labels.
+ _textLabel.font = [MDCTypography body2Font];
+ _textLabel.textColor = [[MDCPalette greyPalette] tint900];
+ _detailTextLabel.font = [MDCTypography body1Font];
+ _detailTextLabel.textColor = [[MDCPalette greyPalette] tint500];
+
[NSLayoutConstraint activateConstraints:@[
// Total height.
// The MDC specs ask for at least 48 pt.

Powered by Google App Engine
This is Rietveld 408576698