Skip to content

Commit

Permalink
[iOS] Fix ipad extra vertical space
Browse files Browse the repository at this point in the history
This patch makes sure the extra space on iPad goes at the bottom of
the view instead of the top.
There is no changes on iPhone.

This also fix a small issue on constraint. The bottom of the scroll
view should be attached to the top of the separator (the one that is
just above the button).

This patch needs to be merge into M124.

Before:
https://drive.google.com/file/d/1Qj5tL14SlxPe7JHVpnyXVVGfyKKA8n4Q/view?resourcekey=0-3f86qDsn2XQwZlYjURMnVQ
After:
https://drive.google.com/file/d/1oOu7n7-MXDvsxv4NJg4ZjgfkbfYjVquR/view?resourcekey=0-NP-f-bJY_RhD3yslI92V-Q


Fixed: 330713313
Change-Id: Iaca0fd933c676c8f18529931ad6e81930d17fb89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5383437
Commit-Queue: Samar Chehade-Lepleux <samarchehade@google.com>
Auto-Submit: Jérôme Lebel <jlebel@chromium.org>
Reviewed-by: Samar Chehade-Lepleux <samarchehade@google.com>
Commit-Queue: Jérôme Lebel <jlebel@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1276304}
  • Loading branch information
Jérôme Lebel authored and Chromium LUCI CQ committed Mar 21, 2024
1 parent 0db323b commit e97c43d
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,7 @@ - (void)viewDidLoad {
constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor],
[_scrollView.widthAnchor
constraintEqualToAnchor:self.view.safeAreaLayoutGuide.widthAnchor],
[_scrollView.bottomAnchor
constraintEqualToAnchor:_separatorView.bottomAnchor],
[_scrollView.bottomAnchor constraintEqualToAnchor:_separatorView.topAnchor],

// Scroll content view constraints.
[_scrollContentView.topAnchor
Expand Down Expand Up @@ -271,8 +270,8 @@ - (void)viewDidLoad {
[_searchEngineStackView.topAnchor
constraintEqualToAnchor:_subtitleTextView.bottomAnchor],
[_searchEngineStackView.bottomAnchor
constraintEqualToAnchor:_scrollContentView.bottomAnchor
constant:-kStackViewMargin],
constraintLessThanOrEqualToAnchor:_scrollContentView.bottomAnchor
constant:-kStackViewMargin],
[_searchEngineStackView.leadingAnchor
constraintEqualToAnchor:_scrollContentView.leadingAnchor
constant:kStackViewMargin],
Expand Down

0 comments on commit e97c43d

Please sign in to comment.