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

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

Issue 1724963002: Color the ink drop ripple and hover effects based on theming. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sky review 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
« no previous file with comments | « ui/views/controls/button/custom_button.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7c4646272870af20a77b0e12aab8a04fa1804f2f..11ea15bb9a72c5c1fa2d6fb5b2215a73d9d0d727 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/animation/ink_drop_hover.h"
@@ -330,6 +331,10 @@ scoped_ptr<InkDropHover> CustomButton::CreateInkDropHover() const {
return ShouldShowInkDropHover() ? Button::CreateInkDropHover() : nullptr;
}
+SkColor CustomButton::GetInkDropBaseColor() const {
+ return ink_drop_base_color_;
+}
+
////////////////////////////////////////////////////////////////////////////////
// CustomButton, gfx::AnimationDelegate implementation:
@@ -351,7 +356,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);
}
« no previous file with comments | « 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