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

Unified Diff: chrome/browser/ui/views/toolbar/toolbar_button.cc

Issue 1422593003: Made material design ink drop QUICK_ACTION animation more visible. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merged in changes to ink drop hover. Created 5 years, 1 month 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 | « no previous file | ui/views/animation/ink_drop_animation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/toolbar/toolbar_button.cc
diff --git a/chrome/browser/ui/views/toolbar/toolbar_button.cc b/chrome/browser/ui/views/toolbar/toolbar_button.cc
index f642a0ff3cca5a1ea1b5f5cf361aaaeeaf5b3910..02d65364557baeb47e11e5bc10513594d265ded3 100644
--- a/chrome/browser/ui/views/toolbar/toolbar_button.cc
+++ b/chrome/browser/ui/views/toolbar/toolbar_button.cc
@@ -185,19 +185,24 @@ void ToolbarButton::OnGestureEvent(ui::GestureEvent* event) {
case ui::ET_GESTURE_LONG_PRESS:
ink_drop_state = views::InkDropState::SLOW_ACTION_PENDING;
break;
- case ui::ET_GESTURE_TAP:
- ink_drop_state = views::InkDropState::QUICK_ACTION;
- break;
case ui::ET_GESTURE_LONG_TAP:
ink_drop_state = views::InkDropState::SLOW_ACTION;
break;
+ case ui::ET_GESTURE_SCROLL_BEGIN:
case ui::ET_GESTURE_END:
- case ui::ET_GESTURE_TAP_CANCEL:
ink_drop_state = views::InkDropState::HIDDEN;
break;
default:
return;
}
+
+ if (ink_drop_state == views::InkDropState::HIDDEN &&
+ ink_drop_animation_controller_->WillAutoAnimateToHidden()) {
+ // Some InkDropStates automatically transition to the HIDDEN state so we
+ // don't make an explicit call. Explicitly animating to HIDDEN in this case
+ // would prematurely pre-empt these animations.
Peter Kasting 2015/11/11 22:07:21 Nit: I'd move this comment above the conditional,
bruthig 2015/11/12 18:30:30 Done.
+ return;
+ }
ink_drop_animation_controller_->AnimateToState(ink_drop_state);
}
« no previous file with comments | « no previous file | ui/views/animation/ink_drop_animation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698