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

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: rebase 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
« no previous file with comments | « ui/views/animation/ink_drop_host_view.h ('k') | ui/views/animation/test/test_ink_drop_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 49d59d64fd70f9971711f9a5fede98a095f02172..4f5f953b410751f9351b0b111a533df5b2099675 100644
--- a/ui/views/animation/ink_drop_host_view.cc
+++ b/ui/views/animation/ink_drop_host_view.cc
@@ -143,6 +143,14 @@ std::unique_ptr<InkDropHighlight> InkDropHostView::CreateInkDropHighlight()
return highlight;
}
+void InkDropHostView::VisibilityChanged(View* starting_from, bool is_visible) {
+ View::VisibilityChanged(starting_from, is_visible);
+ if (GetWidget() && !is_visible) {
+ ink_drop()->AnimateToState(InkDropState::HIDDEN);
+ ink_drop()->SetHovered(false);
+ }
+}
+
void InkDropHostView::OnFocus() {
views::View::OnFocus();
if (ShouldShowInkDropForFocus())
« no previous file with comments | « ui/views/animation/ink_drop_host_view.h ('k') | ui/views/animation/test/test_ink_drop_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698