Chromium Code Reviews| 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 a73d5008cf67e90ce6790de0f9bca7660573736c..87ae0671de860c57c73e4dc47d89d9d342e750c8 100644 |
| --- a/ui/views/controls/button/custom_button.h |
| +++ b/ui/views/controls/button/custom_button.h |
| @@ -152,6 +152,9 @@ class VIEWS_EXPORT CustomButton : public Button, public gfx::AnimationDelegate { |
| // state). This does not take into account enabled state. |
| bool ShouldEnterHoveredState(); |
| + void set_animates_hover(bool animates) { animates_hover_ = animates; } |
| + bool animates_hover() { return animates_hover_; } |
| + |
| // Overridden from Button: |
| void NotifyClick(const ui::Event& event) override; |
| void OnClickCanceled(const ui::Event& event) override; |
| @@ -191,6 +194,11 @@ class VIEWS_EXPORT CustomButton : public Button, public gfx::AnimationDelegate { |
| // The color of the ripple and hover. |
| SkColor ink_drop_base_color_; |
| + // Whether this button has a hover effect. If this returns true, painting the |
|
sky
2016/10/11 19:17:45
As you mentioned previously, it seems wrong that a
|
| + // button is taken to be dependent on the animation state and SchedulePaint() |
| + // is called as the hover animation progresses. |
| + bool animates_hover_ = false; |
| + |
| DISALLOW_COPY_AND_ASSIGN(CustomButton); |
| }; |