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

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

Issue 2447523002: [ash-md] Added different highlighting modes to the InkDropImpl. (Closed)
Patch Set: Fixed compile errors. 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/system_menu_button.cc
diff --git a/ash/common/system/tray/system_menu_button.cc b/ash/common/system/tray/system_menu_button.cc
index 5931b24ecf99bf9a96afd8bb4b431b79d91e120a..c4d12ff0d0e83906ce1a8c4bfa96a0ac1cb942e0 100644
--- a/ash/common/system/tray/system_menu_button.cc
+++ b/ash/common/system/tray/system_menu_button.cc
@@ -11,6 +11,7 @@
#include "ui/gfx/paint_vector_icon.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_impl.h"
#include "ui/views/animation/square_ink_drop_ripple.h"
#include "ui/views/border.h"
#include "ui/views/painter.h"
@@ -50,6 +51,13 @@ SystemMenuButton::SystemMenuButton(views::ButtonListener* listener,
SystemMenuButton::~SystemMenuButton() {}
+std::unique_ptr<views::InkDrop> SystemMenuButton::CreateInkDrop() {
+ std::unique_ptr<views::InkDropImpl> ink_drop =
+ CreateDefaultFloodFillInkDropImpl();
+ ink_drop->SetShowHighlightOnHover(false);
+ return std::move(ink_drop);
+}
+
std::unique_ptr<views::InkDropRipple> SystemMenuButton::CreateInkDropRipple()
const {
const gfx::Size size = GetInkDropSize();
@@ -73,11 +81,6 @@ std::unique_ptr<views::InkDropRipple> SystemMenuButton::CreateInkDropRipple()
std::unique_ptr<views::InkDropHighlight>
SystemMenuButton::CreateInkDropHighlight() const {
- // TODO(bruthig): Show the highlight when the ink drop is active. (See
- // crbug.com/649734)
- if (!ShouldShowInkDropHighlight())
- return nullptr;
-
int highlight_radius = 0;
switch (ink_drop_style_) {
case InkDropStyle::SQUARE:
@@ -96,10 +99,6 @@ SystemMenuButton::CreateInkDropHighlight() const {
return highlight;
}
-bool SystemMenuButton::ShouldShowInkDropHighlight() const {
- return false;
-}
-
gfx::Size SystemMenuButton::GetInkDropSize() const {
gfx::Rect bounds = GetLocalBounds();
bounds.Inset(kTrayPopupInkDropInset, kTrayPopupInkDropInset);

Powered by Google App Engine
This is Rietveld 408576698