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

Unified Diff: ios/chrome/browser/ui/reading_list/reading_list_collection_view_item.mm

Issue 2787763002: Add autolayout height constraint on ReadingListCell (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/reading_list/reading_list_collection_view_item.mm
diff --git a/ios/chrome/browser/ui/reading_list/reading_list_collection_view_item.mm b/ios/chrome/browser/ui/reading_list/reading_list_collection_view_item.mm
index 7370638f60f22d787ef9fe6224c6d6bdd7d92d02..82fe83f1cde14c8bea1d5c8b603a6ac274263a4e 100644
--- a/ios/chrome/browser/ui/reading_list/reading_list_collection_view_item.mm
+++ b/ios/chrome/browser/ui/reading_list/reading_list_collection_view_item.mm
@@ -24,6 +24,9 @@ namespace {
NSString* kSuccessImageString = @"distillation_success";
NSString* kFailureImageString = @"distillation_fail";
+// Height of the cell.
+const CGFloat kCellHeight = 72;
+
// Distillation indicator constants.
const CGFloat kDistillationIndicatorSize = 18;
@@ -327,11 +330,17 @@ const CGFloat kInfoTextTransparency = 0.38;
[_textGuide.topAnchor constraintEqualToAnchor:_titleLabel.topAnchor];
[NSLayoutConstraint activateConstraints:@[
+ // Height for the cell.
+ [self.contentView.heightAnchor constraintEqualToConstant:kCellHeight],
+
+ // Text constraints.
topTextConstraint,
bottomTextConstraint,
+
// Favicons are always the same size.
[_faviconView.widthAnchor constraintEqualToConstant:faviconSize],
[_faviconView.heightAnchor constraintEqualToConstant:faviconSize],
+
// Center the content (favicon and text) vertically.
[_faviconView.centerYAnchor
constraintEqualToAnchor:self.contentView.centerYAnchor],
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698