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

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

Issue 2178163002: Add ink drop ripple to shelf overflow button (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments Created 4 years, 3 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/custom_button.cc
diff --git a/ui/views/controls/button/custom_button.cc b/ui/views/controls/button/custom_button.cc
index 85dc33627b1d853aebe03296affa86e9b96f3618..2d78b6b17ad08d100fde4bb99a469d6a1b0fb5ed 100644
--- a/ui/views/controls/button/custom_button.cc
+++ b/ui/views/controls/button/custom_button.cc
@@ -470,8 +470,13 @@ void CustomButton::NotifyClick(const ui::Event& event) {
}
void CustomButton::OnClickCanceled(const ui::Event& event) {
- AnimateInkDrop(views::InkDropState::HIDDEN,
- ui::LocatedEvent::FromIfValid(&event));
+ if (ink_drop()->GetTargetInkDropState() ==
+ views::InkDropState::ACTION_PENDING ||
+ ink_drop()->GetTargetInkDropState() ==
+ views::InkDropState::ALTERNATE_ACTION_PENDING) {
+ AnimateInkDrop(views::InkDropState::HIDDEN,
+ ui::LocatedEvent::FromIfValid(&event));
+ }
Button::OnClickCanceled(event);
}
« ui/views/animation/ink_drop_host_view.cc ('K') | « ui/views/animation/ink_drop_host_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698