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

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 InkDropHostView::GetInkDrop() to use CreateInkDrop(). 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
« no previous file with comments | « ui/views/controls/button/md_text_button.h ('k') | ui/views/controls/button/toggle_button.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 359d756427e600232c417e50b6923bf84388e5c8..9da1078f7692fe0cc322330f54828c6e15cb0066 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;
@@ -159,11 +161,6 @@ std::unique_ptr<views::InkDropHighlight> MdTextButton::CreateInkDropHighlight()
shadows, GetLocalBounds(), fill_color, kInkDropSmallCornerRadius)));
}
-bool MdTextButton::ShouldShowInkDropForFocus() const {
- // These types of button use FocusRing.
- return false;
-}
-
void MdTextButton::SetEnabledTextColors(SkColor color) {
LabelButton::SetEnabledTextColors(color);
UpdateColors();
« no previous file with comments | « ui/views/controls/button/md_text_button.h ('k') | ui/views/controls/button/toggle_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698