Skip to content

Commit

Permalink
[iOS][Omnibox][M111] Fix row trailing constraint
Browse files Browse the repository at this point in the history
Fix trailing anchor constraint.
stackView.trailing = contentView.trailing - constant
instead of
stackView.trailing = contentView.trailing + constant

(cherry picked from commit 04b2c64)

Bug: 1411903
Change-Id: Ia84c1c0b95633cc90f8adf034bb800f37de9aa5e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4212389
Reviewed-by: Stepan Khapugin <stkhapugin@chromium.org>
Auto-Submit: Christian Xu <christianxu@chromium.org>
Commit-Queue: Christian Xu <christianxu@chromium.org>
Reviewed-by: Ewann Pellé <ewannpv@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#1100006}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4219100
Commit-Queue: Stepan Khapugin <stkhapugin@chromium.org>
Cr-Commit-Position: refs/branch-heads/5563@{chromium#145}
Cr-Branched-From: 3ac59a6-refs/heads/main@{#1097615}
  • Loading branch information
ChristianXuG authored and Chromium LUCI CQ committed Feb 3, 2023
1 parent c1acccb commit 7777aa4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ios/chrome/browser/ui/omnibox/popup/omnibox_popup_row_cell.mm
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,12 @@ - (void)attachToLayoutGuides {
DCHECK(self.imageLayoutGuide);
DCHECK(self.textLayoutGuide);

// The text should extend to the cell's trailing edge when there is no
// trailing button.
// When there is no trailing button, the text should extend to the cell's
// trailing edge with a padding.
NSLayoutConstraint* stackViewToCellTrailing =
[self.textStackView.trailingAnchor
constraintEqualToAnchor:self.contentView.trailingAnchor
constant:kTextTrailingMargin];
constant:-kTextTrailingMargin];
stackViewToCellTrailing.priority = UILayoutPriorityDefaultHigh;
self.textTrailingConstraint = stackViewToCellTrailing;

Expand Down

0 comments on commit 7777aa4

Please sign in to comment.