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

Unified Diff: ui/views/controls/button/toggle_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: ui/views/controls/button/toggle_button.cc
diff --git a/ui/views/controls/button/toggle_button.cc b/ui/views/controls/button/toggle_button.cc
index 8848aec48a43a17f6d65d190a07e501f216df852..a697c876802cfa5f0a968dbe946b7bacd18df546 100644
--- a/ui/views/controls/button/toggle_button.cc
+++ b/ui/views/controls/button/toggle_button.cc
@@ -9,6 +9,7 @@
#include "ui/gfx/canvas.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/color_utils.h"
+#include "ui/views/animation/ink_drop_impl.h"
#include "ui/views/animation/ink_drop_ripple.h"
#include "ui/views/border.h"
@@ -211,8 +212,11 @@ SkColor ToggleButton::GetInkDropBaseColor() const {
: kTrackOffColor;
}
-bool ToggleButton::ShouldShowInkDropHighlight() const {
- return false;
+std::unique_ptr<InkDrop> ToggleButton::CreateInkDrop() {
+ std::unique_ptr<InkDropImpl> ink_drop =
+ CustomButton::CreateDefaultInkDropImpl();
+ ink_drop->SetShowHighlightOnHover(false);
+ return std::move(ink_drop);
}
void ToggleButton::AnimationProgressed(const gfx::Animation* animation) {

Powered by Google App Engine
This is Rietveld 408576698