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

Unified Diff: ui/views/controls/button/menu_button.cc

Issue 2042073002: Centered flood fill style ink drop ripples on mouse/touch points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Polished for review. Created 4 years, 6 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
Index: ui/views/controls/button/menu_button.cc
diff --git a/ui/views/controls/button/menu_button.cc b/ui/views/controls/button/menu_button.cc
index 20b3452374de8f1e6335e34c97250b56a45e2456..832aec56f1ae541474aee0d228752b16eb93c067 100644
--- a/ui/views/controls/button/menu_button.cc
+++ b/ui/views/controls/button/menu_button.cc
@@ -148,7 +148,7 @@ bool MenuButton::Activate(const ui::Event* event) {
menu_closed_time_ = TimeTicks::Now();
if (!increment_pressed_lock_called && pressed_lock_count_ == 0)
- AnimateInkDrop(InkDropState::ACTION_TRIGGERED);
+ AnimateInkDrop(InkDropState::ACTION_TRIGGERED, event);
// We must return false here so that the RootView does not get stuck
// sending all mouse pressed events to us instead of the appropriate
@@ -156,7 +156,7 @@ bool MenuButton::Activate(const ui::Event* event) {
return false;
}
- AnimateInkDrop(InkDropState::HIDDEN);
+ AnimateInkDrop(InkDropState::HIDDEN, event);
return true;
}
@@ -222,7 +222,7 @@ void MenuButton::OnMouseReleased(const ui::MouseEvent& event) {
HitTestPoint(event.location()) && !InDrag()) {
Activate(&event);
} else {
- AnimateInkDrop(InkDropState::HIDDEN);
+ AnimateInkDrop(InkDropState::HIDDEN, &event);
LabelButton::OnMouseReleased(event);
}
}
@@ -376,7 +376,7 @@ void MenuButton::IncrementPressedLocked(bool snap_ink_drop_to_activated) {
if (snap_ink_drop_to_activated)
ink_drop()->SnapToActivated();
else
- AnimateInkDrop(InkDropState::ACTIVATED);
+ AnimateInkDrop(InkDropState::ACTIVATED, nullptr /* event */);
}
SetState(STATE_PRESSED);
}
@@ -398,7 +398,7 @@ void MenuButton::DecrementPressedLocked() {
// The widget may be null during shutdown. If so, it doesn't make sense to
// try to add an ink drop effect.
if (GetWidget() && state() != STATE_PRESSED)
- AnimateInkDrop(InkDropState::DEACTIVATED);
+ AnimateInkDrop(InkDropState::DEACTIVATED, nullptr /* event */);
}
}

Powered by Google App Engine
This is Rietveld 408576698