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

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

Issue 2028303004: Hide hover effect on hidden ink drop host views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests Created 4 years, 7 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/animation/ink_drop_host_view.cc
diff --git a/ui/views/animation/ink_drop_host_view.cc b/ui/views/animation/ink_drop_host_view.cc
index dc7f67e92c6f4439e9ce396826e5a39ec17b7c16..df96f9734fb6661a0dc41e5e10e487c6fa03e933 100644
--- a/ui/views/animation/ink_drop_host_view.cc
+++ b/ui/views/animation/ink_drop_host_view.cc
@@ -72,6 +72,14 @@ std::unique_ptr<InkDropHover> InkDropHostView::CreateInkDropHover() const {
return hover;
}
+void InkDropHostView::VisibilityChanged(View* starting_from, bool is_visible) {
+ View::VisibilityChanged(starting_from, is_visible);
+ if (ink_drop_delegate() && GetWidget() && !is_visible) {
+ ink_drop_delegate()->GetInkDrop()->AnimateToState(InkDropState::HIDDEN);
+ ink_drop_delegate()->GetInkDrop()->SetHovered(false);
+ }
+}
+
void InkDropHostView::OnFocus() {
views::View::OnFocus();
if (ink_drop_delegate() && ShouldShowInkDropForFocus())

Powered by Google App Engine
This is Rietveld 408576698