Index: ui/views/animation/ink_drop_animation_controller_impl.cc |
diff --git a/ui/views/animation/ink_drop_animation_controller_impl.cc b/ui/views/animation/ink_drop_animation_controller_impl.cc |
index 963440d909e6478c60690c7374745207bc219dea..d28a280868bca12e92ff55b783360651ff2fbbaa 100644 |
--- a/ui/views/animation/ink_drop_animation_controller_impl.cc |
+++ b/ui/views/animation/ink_drop_animation_controller_impl.cc |
@@ -29,7 +29,7 @@ const int kHoverFadeInAfterAnimationDurationInMs = 250; |
// The duration, in milliseconds, of the hover state fade out animation when it |
// is triggered by an ink drop ripple animation starting. |
-const int kHoverFadeOutBeforeAnimationDurationInMs = 300; |
+const int kHoverFadeOutBeforeAnimationDurationInMs = 120; |
// The amount of time in milliseconds that |hover_| should delay after a ripple |
// animation before fading in. |
@@ -85,7 +85,8 @@ void InkDropAnimationControllerImpl::AnimateToState( |
if (ink_drop_state != views::InkDropState::HIDDEN) { |
SetHoveredInternal(false, base::TimeDelta::FromMilliseconds( |
- kHoverFadeOutBeforeAnimationDurationInMs)); |
+ kHoverFadeOutBeforeAnimationDurationInMs), |
varkha
2016/04/21 16:16:49
nitty nit: I thought the second argument to SetHov
bruthig
2016/04/21 21:14:03
I agree, but this is how 'git cl format' formats i
|
+ true); |
} |
ink_drop_animation_->AnimateToState(ink_drop_state); |
@@ -96,7 +97,7 @@ void InkDropAnimationControllerImpl::SnapToActivated() { |
if (!ink_drop_animation_) |
CreateInkDropAnimation(); |
- SetHoveredInternal(false, base::TimeDelta()); |
+ SetHoveredInternal(false, base::TimeDelta(), false); |
ink_drop_animation_->SnapToActivated(); |
} |
@@ -107,7 +108,8 @@ void InkDropAnimationControllerImpl::SetHovered(bool is_hovered) { |
is_hovered ? base::TimeDelta::FromMilliseconds( |
kHoverFadeInFromUserInputDurationInMs) |
: base::TimeDelta::FromMilliseconds( |
- kHoverFadeOutFromUserInputDurationInMs)); |
+ kHoverFadeOutFromUserInputDurationInMs), |
+ false); |
} |
void InkDropAnimationControllerImpl::DestroyHiddenTargetedAnimations() { |
@@ -175,7 +177,8 @@ void InkDropAnimationControllerImpl::InkDropAnimationEnded( |
void InkDropAnimationControllerImpl::SetHoveredInternal( |
bool is_hovered, |
- base::TimeDelta animation_duration) { |
+ base::TimeDelta animation_duration, |
+ bool explode) { |
StopHoverAfterAnimationTimer(); |
if (IsHoverFadingInOrVisible() == is_hovered) |
@@ -186,7 +189,7 @@ void InkDropAnimationControllerImpl::SetHoveredInternal( |
if (hover_ && !IsVisible()) |
hover_->FadeIn(animation_duration); |
} else { |
- hover_->FadeOut(animation_duration); |
+ hover_->FadeOut(animation_duration, explode); |
varkha
2016/04/21 16:16:49
This seems to be the only place where |hover_| is
bruthig
2016/04/21 21:14:03
The check on line 184 should short circuit return
varkha
2016/04/22 19:57:20
nit: Yes I see the logic now. It is somewhat hidde
bruthig
2016/04/22 21:08:20
Where would you suggest I put the DCHECK? I'd thi
varkha
2016/04/22 23:05:55
Right.
|
} |
} |
@@ -210,7 +213,8 @@ void InkDropAnimationControllerImpl::StopHoverAfterAnimationTimer() { |
void InkDropAnimationControllerImpl::HoverAfterAnimationTimerFired() { |
SetHoveredInternal(true, base::TimeDelta::FromMilliseconds( |
- kHoverFadeInAfterAnimationDurationInMs)); |
+ kHoverFadeInAfterAnimationDurationInMs), |
+ true); |
hover_after_animation_timer_.reset(); |
} |