Commit 2867a716 authored by sczs's avatar sczs Committed by Commit Bot

[ios] Fixes small Collections constraint issues.

- Changes the disclore headerFooter subtitle label CompressionResistancePriority to prevent it
being compressed when refreshing the Cell.
- Deletes some un-needed constraints that weren't playing nicely with the TableView dynamic sizing,
causing broken constraints.

Bug: 851929
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: Ifd641c1d7c227592d4767d9af1874dfcb3e556ca
Reviewed-on: https://chromium-review.googlesource.com/1123335Reviewed-by: default avataredchin <edchin@chromium.org>
Commit-Queue: Sergio Collazos <sczs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#572235}
parent e24532bb
......@@ -94,8 +94,7 @@ const float kImageWidth = 28.0f;
[self.contentView addSubview:horizontalStack];
[NSLayoutConstraint activateConstraints:@[
// The favicon view is a fixed size.
[_imageView.heightAnchor constraintEqualToConstant:kImageWidth],
// The favicon view has fixed width.
[_imageView.widthAnchor constraintEqualToConstant:kImageWidth],
// Horizontal Stack constraints.
[horizontalStack.leadingAnchor
......
......@@ -88,8 +88,6 @@
// Set and activate constraints.
[NSLayoutConstraint activateConstraints:@[
[self.contentView.heightAnchor constraintGreaterThanOrEqualToConstant:
kTableViewHeaderFooterViewHeight],
[horizontalStack.leadingAnchor
constraintEqualToAnchor:self.contentView.leadingAnchor
constant:kTableViewHorizontalSpacing],
......
......@@ -79,13 +79,16 @@ constexpr float kRotationNinetyCCW = -(90 / 180.0) * M_PI;
preferredFontDescriptorWithTextStyle:UIFontTextStyleSubheadline];
UIFontDescriptor* styleDescriptor = [baseDescriptor
fontDescriptorWithSymbolicTraits:UIFontDescriptorTraitBold];
_titleLabel.font =
[UIFont fontWithDescriptor:styleDescriptor size:kUseDefaultFontSize];
_subtitleLabel = [[UILabel alloc] init];
_subtitleLabel.font =
[UIFont preferredFontForTextStyle:UIFontTextStyleCaption1];
_subtitleLabel.textColor = [UIColor lightGrayColor];
[_subtitleLabel
setContentCompressionResistancePriority:UILayoutPriorityDefaultHigh
forAxis:UILayoutConstraintAxisVertical];
// Vertical StackView.
UIStackView* verticalStack = [[UIStackView alloc]
......@@ -112,8 +115,6 @@ constexpr float kRotationNinetyCCW = -(90 / 180.0) * M_PI;
// Set and activate constraints.
[NSLayoutConstraint activateConstraints:@[
[self.contentView.heightAnchor constraintGreaterThanOrEqualToConstant:
kTableViewHeaderFooterViewHeight],
[horizontalStack.leadingAnchor
constraintEqualToAnchor:self.contentView.leadingAnchor
constant:kTableViewHorizontalSpacing],
......
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