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

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

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.h
diff --git a/ui/views/controls/button/custom_button.h b/ui/views/controls/button/custom_button.h
index cae7dd089734dc1f42f10021728e0672be91d1d5..1ed491ea667d0b807b852a771ab9bdb1c5b80adb 100644
--- a/ui/views/controls/button/custom_button.h
+++ b/ui/views/controls/button/custom_button.h
@@ -75,6 +75,8 @@ class VIEWS_EXPORT CustomButton : public Button,
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;
@@ -108,6 +110,7 @@ class VIEWS_EXPORT CustomButton : public Button,
void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override;
gfx::Point CalculateInkDropCenter() const override;
bool ShouldShowInkDropHover() const override;
+ SkColor GetInkDropBaseColor() const override;
protected:
// Construct the Button with a Listener. See comment for Button's ctor.
@@ -199,6 +202,9 @@ class VIEWS_EXPORT CustomButton : public Button,
// 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);
};

Powered by Google App Engine
This is Rietveld 408576698