Commit ce463f17 authored by Maxime Charland's avatar Maxime Charland Committed by Commit Bot

Chrome Empties: Fix width of button in TableViewIllustratedCell

Currently, the button in TableViewIllustratedCell has a leading and trailing constraint. This means the button's width is determined by the view's size, instead of the button's content's size.

Removing the leading and trailing constraints of the button allows for a more flexible sizing and is better aligned with the Chrome Empties design.

(Googlers only links)
Screenshot without constraints : https://drive.google.com/file/d/1TE00X2gZks0_FUTYzOQoQoHgXOvTo6ux/view?usp=sharing
Screenshot with constraints : https://drive.google.com/file/d/16YIpHydO0tnsxS5X5sUBMc3u2xd_UWSw/view?usp=sharing

Bug: 1098328
Change-Id: Ie858503dd221936798e4ced65664eeac67b63691
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2317606Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Reviewed-by: default avatarTommy Martino <tmartino@chromium.org>
Commit-Queue: Maxime Charland <mcharland@google.com>
Cr-Commit-Position: refs/heads/master@{#792430}
parent 9e6c93b6
......@@ -146,17 +146,13 @@ const CGFloat kButtonCornerRadius = 8.0;
[_titleLabel.trailingAnchor
constraintEqualToAnchor:stackView.trailingAnchor],
// Subtitle and button should have additional margins on both sides
// Subtitle should have additional margins on both sides
[_subtitleLabel.leadingAnchor
constraintEqualToAnchor:stackView.leadingAnchor
constant:kItemMargin],
[_subtitleLabel.trailingAnchor
constraintEqualToAnchor:stackView.trailingAnchor
constant:-kItemMargin],
[_button.leadingAnchor constraintEqualToAnchor:stackView.leadingAnchor
constant:kItemMargin],
[_button.trailingAnchor constraintEqualToAnchor:stackView.trailingAnchor
constant:-kItemMargin],
[stackView.leadingAnchor
constraintEqualToAnchor:self.contentView.leadingAnchor
......
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