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

Unified Diff: ash/common/system/tray/tray_background_view.cc

Issue 2499523003: Add ink drop masking to TrayBackgroundView (Closed)
Patch Set: Addressed review comments Created 4 years, 1 month 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: ash/common/system/tray/tray_background_view.cc
diff --git a/ash/common/system/tray/tray_background_view.cc b/ash/common/system/tray/tray_background_view.cc
index cf52b94756457b0ce779e8acc491cf5f05e72c42..b2ad7299bec648a365af2bff3fbe018e9bc04043 100644
--- a/ash/common/system/tray/tray_background_view.cc
+++ b/ash/common/system/tray/tray_background_view.cc
@@ -35,6 +35,7 @@
#include "ui/gfx/transform.h"
#include "ui/views/animation/flood_fill_ink_drop_ripple.h"
#include "ui/views/animation/ink_drop_highlight.h"
+#include "ui/views/animation/ink_drop_mask.h"
#include "ui/views/background.h"
#include "ui/views/layout/box_layout.h"
#include "ui/wm/core/window_animations.h"
@@ -572,6 +573,14 @@ void TrayBackgroundView::SetSeparatorVisibility(bool is_shown) {
SchedulePaint();
}
+std::unique_ptr<views::InkDropMask> TrayBackgroundView::CreateInkDropMask()
+ const {
+ return base::MakeUnique<views::RoundRectInkDropMask>(
+ GetLocalBounds(),
+ GetBackgroundBounds(GetContentsBounds(), shelf_alignment_),
+ kTrayRoundedBorderRadius);
+}
+
bool TrayBackgroundView::ShouldEnterPushedState(const ui::Event& event) {
if (is_active_)
return false;

Powered by Google App Engine
This is Rietveld 408576698