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

Unified Diff: ash/common/shelf/shelf_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/shelf/shelf_button.cc
diff --git a/ash/common/shelf/shelf_button.cc b/ash/common/shelf/shelf_button.cc
index ef00082ce3f6de53770d4df141be23cdd5b58971..58b8dbd5c132c0ef432954d390dac82674ac11e9 100644
--- a/ash/common/shelf/shelf_button.cc
+++ b/ash/common/shelf/shelf_button.cc
@@ -29,6 +29,7 @@
#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_skia_operations.h"
#include "ui/gfx/skbitmap_operations.h"
+#include "ui/views/animation/ink_drop_impl.h"
#include "ui/views/animation/square_ink_drop_ripple.h"
#include "ui/views/controls/image_view.h"
@@ -50,7 +51,6 @@ const int kIndicatorCanvasScale = 5;
// Shelf item ripple constants.
const int kInkDropSmallSize = 48;
const int kInkDropLargeSize = 60;
-const int kInkDropLargeCornerRadius = 4;
// Padding from the edge of the shelf to the application icon when the shelf
// is horizontally and vertically aligned, respectively.
@@ -520,8 +520,11 @@ bool ShelfButton::ShouldEnterPushedState(const ui::Event& event) {
return CustomButton::ShouldEnterPushedState(event);
}
-bool ShelfButton::ShouldShowInkDropHighlight() const {
- return false;
+std::unique_ptr<views::InkDrop> ShelfButton::CreateInkDrop() {
+ std::unique_ptr<views::InkDropImpl> ink_drop =
+ CustomButton::CreateDefaultInkDropImpl();
+ ink_drop->SetShowHighlightOnHover(false);
+ return std::move(ink_drop);
}
void ShelfButton::NotifyClick(const ui::Event& event) {

Powered by Google App Engine
This is Rietveld 408576698