Skip to content

Commit

Permalink
[ios] Adds fixed height for SummaryPageInfo cell
Browse files Browse the repository at this point in the history
[email protected]

(cherry picked from commit 009890a)

Bug: 879134
Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs
Change-Id: Ie3c2b55b86c9710595c87856ce213675facac9b0
Reviewed-on: https://chromium-review.googlesource.com/1199686
Reviewed-by: Mark Cogan <[email protected]>
Commit-Queue: Sergio Collazos <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#588538}
Reviewed-on: https://chromium-review.googlesource.com/1208911
Reviewed-by: Sergio Collazos <[email protected]>
Cr-Commit-Position: refs/branch-heads/3538@{#73}
Cr-Branched-From: 79f7c91-refs/heads/master@{#587811}
  • Loading branch information
sczs committed Sep 5, 2018
1 parent bbaf922 commit 3d3d7a4
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@

namespace {
const CGFloat kFooterCellHorizontalPadding = 16;

const CGFloat kButtonEdgeInset = 9;
const CGFloat kSeparatorEdgeInset = 14;
const CGFloat kSummaryPageInfoRowHeight = 55;

typedef NS_ENUM(NSInteger, SectionIdentifier) {
SectionIdentifierSummary = kSectionIdentifierEnumZero,
Expand Down Expand Up @@ -398,6 +398,13 @@ - (CGFloat)collectionView:(UICollectionView*)collectionView
CollectionViewItem* item =
[self.collectionViewModel itemAtIndexPath:indexPath];

// TODO(crbug.com/879588): Remove this when/if cr_preferredHeightForWidth
// works on the next iOS 12 releases.
if (@available(iOS 12, *)) {
if (item.type == ItemTypeSummaryPageInfo)
return kSummaryPageInfoRowHeight;
}

UIEdgeInsets inset = [self collectionView:collectionView
layout:collectionView.collectionViewLayout
insetForSectionAtIndex:indexPath.section];
Expand Down

0 comments on commit 3d3d7a4

Please sign in to comment.