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

Unified Diff: ui/views/controls/button/custom_button.cc

Issue 1682893002: Color the ink drop ripple and hover effects based on theming. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unit tests Created 4 years, 10 months 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/custom_button.cc
diff --git a/ui/views/controls/button/custom_button.cc b/ui/views/controls/button/custom_button.cc
index 7f721a5f8a3d1a133cf3e8b89321cdb07ff95938..13e8893396c9e02df44ab703469da00b218b095a 100644
--- a/ui/views/controls/button/custom_button.cc
+++ b/ui/views/controls/button/custom_button.cc
@@ -9,6 +9,7 @@
#include "ui/events/event_utils.h"
#include "ui/events/keycodes/keyboard_codes.h"
#include "ui/gfx/animation/throb_animation.h"
+#include "ui/gfx/color_palette.h"
#include "ui/gfx/screen.h"
#include "ui/views/animation/ink_drop_delegate.h"
#include "ui/views/controls/button/blue_button.h"
@@ -367,6 +368,10 @@ bool CustomButton::ShouldShowInkDropHover() const {
return enabled() && IsMouseHovered() && !InDrag();
}
+SkColor CustomButton::GetInkDropBaseColor() const {
+ return ink_drop_base_color_;
+}
+
////////////////////////////////////////////////////////////////////////////////
// CustomButton, protected:
@@ -381,7 +386,8 @@ CustomButton::CustomButton(ButtonListener* listener)
ink_drop_delegate_(nullptr),
notify_action_(NOTIFY_ON_RELEASE),
has_ink_drop_action_on_click_(false),
- ink_drop_action_on_click_(InkDropState::QUICK_ACTION) {
+ ink_drop_action_on_click_(InkDropState::QUICK_ACTION),
+ ink_drop_base_color_(gfx::kPlaceholderColor) {
hover_animation_.SetSlideDuration(kHoverFadeDurationMs);
}
« ui/views/animation/ink_drop_hover.cc ('K') | « ui/views/controls/button/custom_button.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698