Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Unified Diff: ui/views/animation/button_ink_drop_delegate.cc

Issue 1832963002: MD - add ripples to DL shelf items (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix another TODO Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/animation/button_ink_drop_delegate.h ('k') | ui/views/animation/flood_fill_ink_drop_animation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/animation/button_ink_drop_delegate.cc
diff --git a/ui/views/animation/button_ink_drop_delegate.cc b/ui/views/animation/button_ink_drop_delegate.cc
index 7d25f57a6bc064605f1365a1d461c7fa21ce49f8..73152d77bc5892f1f12f004282bf632ad04dbf8e 100644
--- a/ui/views/animation/button_ink_drop_delegate.cc
+++ b/ui/views/animation/button_ink_drop_delegate.cc
@@ -66,10 +66,10 @@ void ButtonInkDropDelegate::OnGestureEvent(ui::GestureEvent* event) {
event->SetHandled();
break;
case ui::ET_GESTURE_LONG_PRESS:
- ink_drop_state = InkDropState::SLOW_ACTION_PENDING;
+ ink_drop_state = InkDropState::ALTERNATE_ACTION_PENDING;
break;
case ui::ET_GESTURE_LONG_TAP:
- ink_drop_state = InkDropState::SLOW_ACTION;
+ ink_drop_state = InkDropState::ALTERNATE_ACTION_TRIGGERED;
break;
case ui::ET_GESTURE_END:
if (current_ink_drop_state == InkDropState::ACTIVATED)
@@ -82,9 +82,11 @@ void ButtonInkDropDelegate::OnGestureEvent(ui::GestureEvent* event) {
return;
}
+ last_ink_drop_location_ = event->location();
+
if (ink_drop_state == InkDropState::HIDDEN &&
- (current_ink_drop_state == InkDropState::QUICK_ACTION ||
- current_ink_drop_state == InkDropState::SLOW_ACTION ||
+ (current_ink_drop_state == InkDropState::ACTION_TRIGGERED ||
+ current_ink_drop_state == InkDropState::ALTERNATE_ACTION_TRIGGERED ||
current_ink_drop_state == InkDropState::DEACTIVATED)) {
// These InkDropStates automatically transition to the HIDDEN state so we
// don't make an explicit call. Explicitly animating to HIDDEN in this case
« no previous file with comments | « ui/views/animation/button_ink_drop_delegate.h ('k') | ui/views/animation/flood_fill_ink_drop_animation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698