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

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

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/animation/test/test_ink_drop_host.cc ('k') | ui/views/controls/button/custom_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/button/custom_button.h
diff --git a/ui/views/controls/button/custom_button.h b/ui/views/controls/button/custom_button.h
index 36661c14a5c34b2259e22b62fb4d9b6528e8583a..1ec88a00b73dca1ddfcb144cb5af0ee628af4c40 100644
--- a/ui/views/controls/button/custom_button.h
+++ b/ui/views/controls/button/custom_button.h
@@ -72,6 +72,8 @@ class VIEWS_EXPORT CustomButton : public Button, public gfx::AnimationDelegate {
notify_action_ = notify_action;
}
+ void set_ink_drop_base_color(SkColor color) { ink_drop_base_color_ = color; }
+
void SetHotTracked(bool is_hot_tracked);
bool IsHotTracked() const;
@@ -96,6 +98,7 @@ class VIEWS_EXPORT CustomButton : public Button, public gfx::AnimationDelegate {
void GetAccessibleState(ui::AXViewState* state) override;
void VisibilityChanged(View* starting_from, bool is_visible) override;
scoped_ptr<InkDropHover> CreateInkDropHover() const override;
+ SkColor GetInkDropBaseColor() const override;
// Overridden from gfx::AnimationDelegate:
void AnimationProgressed(const gfx::Animation* animation) override;
@@ -183,6 +186,9 @@ class VIEWS_EXPORT CustomButton : public Button, public gfx::AnimationDelegate {
// is clicked.
InkDropState ink_drop_action_on_click_;
+ // The color of the ripple and hover.
+ SkColor ink_drop_base_color_;
+
DISALLOW_COPY_AND_ASSIGN(CustomButton);
};
« no previous file with comments | « ui/views/animation/test/test_ink_drop_host.cc ('k') | ui/views/controls/button/custom_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698