Commit bc269b60 authored by Eugene But's avatar Eugene But Committed by Commit Bot

Fix Download Manager autolayout issue.

Download Manager has the following UI elements:
 - state icon
 - status text (f.e. <File Name> 10 MB)
 - action button (f.e. Download)
 - close button

Status text width is highly variable and often does not fit the UI. So
status text width should be flexible and action button width should be
constant.

This sets setContentCompressionResistancePriority: for status label to
UILayoutPriorityDefaultLow.

Bug: 822768
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I9505511e7d3a1a8dbcf22c7df406530cb270c55a
Reviewed-on: https://chromium-review.googlesource.com/966794
Commit-Queue: Eugene But <eugenebut@chromium.org>
Reviewed-by: default avataredchin <edchin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543849}
parent aa797062
......@@ -409,6 +409,10 @@ NSString* GetSizeString(long long size_in_bytes) {
_statusLabel = [[UILabel alloc] initWithFrame:CGRectZero];
_statusLabel.translatesAutoresizingMaskIntoConstraints = NO;
_statusLabel.font = [MDCTypography subheadFont];
[_statusLabel
setContentCompressionResistancePriority:UILayoutPriorityDefaultLow
forAxis:
UILayoutConstraintAxisHorizontal];
[self updateStatusLabel];
}
return _statusLabel;
......
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