Commit c4928cae authored by Gauthier Ambard's avatar Gauthier Ambard Committed by Commit Bot

[iOS] Tweak OpenInNewTab animation

This CL updates the OpenInNewTab animation.

Bug: 865863
Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: I1138a23bb96c9b81e50f247b5bf2b293df001e60
Reviewed-on: https://chromium-review.googlesource.com/1181128Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584721}
parent 7f9168f4
......@@ -5433,6 +5433,11 @@ applicationCommandEndpoint:(id<ApplicationCommands>)applicationCommandEndpoint {
- (void)animateNewTabInBackgroundFromPoint:(CGPoint)originPoint
withCompletion:(ProceduralBlock)completion {
self.inNewTabAnimation = YES;
// Exit fullscreen if needed.
FullscreenControllerFactory::GetInstance()
->GetForBrowserState(_browserState)
->ResetModel();
const CGFloat kAnimatedViewSize = 50;
BackgroundTabAnimationView* animatedView = [[BackgroundTabAnimationView alloc]
initWithFrame:CGRectMake(0, 0, kAnimatedViewSize, kAnimatedViewSize)];
......
......@@ -18,7 +18,6 @@
namespace {
const CGFloat kImageSize = 28;
const CGFloat kImageTintColor = 0x1A73E8;
const CGFloat kMaxScale = 1.3;
const CGFloat kMinScale = 0.7;
CGFloat kRotationAngleInRadians = 20.0 / 180 * M_PI;
......@@ -107,7 +106,7 @@ CGFloat kRotationAngleInRadians = 20.0 / 180 * M_PI;
[[UIImage imageNamed:@"open_new_tab_background"]
imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]];
linkImage.translatesAutoresizingMaskIntoConstraints = NO;
linkImage.tintColor = UIColorFromRGB(kImageTintColor);
linkImage.tintColor = [UIColor colorWithWhite:0.4 alpha:1];
[self addSubview:linkImage];
......
......@@ -31,7 +31,7 @@
namespace {
const CGFloat kRotationInRadians = 5.0 / 180 * M_PI;
// Scale factor for the animation, must be < 1.
const CGFloat kScaleFactorDiff = 0.25;
const CGFloat kScaleFactorDiff = 0.50;
const CGFloat kTabGridAnimationsTotalDuration = 0.5;
} // namespace
......
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