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

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

Issue 1518463002: Hides ink ripple when a button drag is started (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Hides ink ripple when a button drag is started (-logs) Created 5 years 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/controls/button/custom_button.h ('k') | ui/views/view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bb4550098ee142bdc6194be9f87886aecb609036..849465c26867638bdcfe101e0ab357b38da708e6 100644
--- a/ui/views/controls/button/custom_button.cc
+++ b/ui/views/controls/button/custom_button.cc
@@ -287,6 +287,12 @@ void CustomButton::ShowContextMenu(const gfx::Point& p,
View::ShowContextMenu(p, source_type);
}
+void CustomButton::OnDragStarted(const ui::LocatedEvent& event) {
+ Button::OnDragStarted(event);
+ if (ink_drop_delegate_)
+ ink_drop_delegate_->OnAction(InkDropState::HIDDEN);
+}
+
void CustomButton::OnDragDone() {
// Only reset the state to normal if the button isn't currently disabled
// (since disabled buttons may still be able to be dragged).
« no previous file with comments | « ui/views/controls/button/custom_button.h ('k') | ui/views/view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698