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

Unified Diff: ui/views/controls/button/md_text_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/md_text_button.cc
diff --git a/ui/views/controls/button/md_text_button.cc b/ui/views/controls/button/md_text_button.cc
index 7d160e840076334df11e440708e405af23118de2..1931f5bc210f0e23a13fc7d57aaffef6089a2fe9 100644
--- a/ui/views/controls/button/md_text_button.cc
+++ b/ui/views/controls/button/md_text_button.cc
@@ -12,6 +12,7 @@
#include "ui/native_theme/native_theme.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/ink_drop_painted_layer_delegates.h"
#include "ui/views/background.h"
#include "ui/views/border.h"
@@ -121,6 +122,10 @@ SkColor MdTextButton::GetInkDropBaseColor() const {
return color_utils::DeriveDefaultIconColor(label()->enabled_color());
}
+std::unique_ptr<InkDrop> MdTextButton::CreateInkDrop() {
+ return CreateDefaultFloodFillInkDropImpl();
+}
+
std::unique_ptr<views::InkDropRipple> MdTextButton::CreateInkDropRipple()
const {
return std::unique_ptr<views::InkDropRipple>(
@@ -136,9 +141,6 @@ void MdTextButton::StateChanged() {
std::unique_ptr<views::InkDropHighlight> MdTextButton::CreateInkDropHighlight()
const {
- if (!ShouldShowInkDropHighlight())
- return nullptr;
-
// The prominent button hover effect is a shadow.
const int kYOffset = 1;
const int kSkiaBlurRadius = 2;

Powered by Google App Engine
This is Rietveld 408576698