Commit 98167279 authored by Roberto Moura's avatar Roberto Moura Committed by Commit Bot

Move tab grid's new tab button upwards when thumb strip is enabled.

The tab grid's new tab button is covered by the BVC when the tab grid is
visible and the thumb strip feature is enabled. Nudge the new tab button
by a distance equal to the height of the BVC that remains visible when
the tab grid is showing.

Bug: 1094335
Change-Id: I54d7aa20633e109cf41b6bfe46866cecb23584aa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2487320
Commit-Queue: Roberto Moura <mouraroberto@google.com>
Auto-Submit: Roberto Moura <mouraroberto@google.com>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819450}
parent a1e303fe
......@@ -4,8 +4,10 @@
#import "ios/chrome/browser/ui/tab_grid/tab_grid_bottom_toolbar.h"
#import "ios/chrome/browser/ui/tab_grid/grid/grid_constants.h"
#import "ios/chrome/browser/ui/tab_grid/tab_grid_constants.h"
#import "ios/chrome/browser/ui/tab_grid/tab_grid_new_tab_button.h"
#import "ios/chrome/browser/ui/thumb_strip/thumb_strip_feature.h"
#import "ios/chrome/browser/ui/util/uikit_ui_util.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
......@@ -147,11 +149,15 @@
_largeNewTabButton.translatesAutoresizingMaskIntoConstraints = NO;
_largeNewTabButton.page = self.page;
CGFloat floatingButtonVerticalInset = kTabGridFloatingButtonVerticalInset;
if (IsThumbStripEnabled())
floatingButtonVerticalInset += kBVCHeightTabGrid;
_floatingConstraints = @[
[_largeNewTabButton.topAnchor constraintEqualToAnchor:self.topAnchor],
[_largeNewTabButton.bottomAnchor
constraintEqualToAnchor:self.safeAreaLayoutGuide.bottomAnchor
constant:-kTabGridFloatingButtonVerticalInset],
constant:-floatingButtonVerticalInset],
[_largeNewTabButton.trailingAnchor
constraintEqualToAnchor:self.trailingAnchor
constant:-kTabGridFloatingButtonHorizontalInset],
......
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