| 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 62f048173c68b2de35b20602c71f909c42275b17..554634119d3470fe7d3cafffc5dac5a23080bdc7 100644
|
| --- a/ui/views/controls/button/custom_button.cc
|
| +++ b/ui/views/controls/button/custom_button.cc
|
| @@ -130,13 +130,14 @@ void CustomButton::OnEnabledChanged() {
|
| if (enabled() ? (state_ != STATE_DISABLED) : (state_ == STATE_DISABLED))
|
| return;
|
|
|
| - if (enabled())
|
| - SetState(ShouldEnterHoveredState() ? STATE_HOVERED : STATE_NORMAL);
|
| - else
|
| + if (enabled()) {
|
| + bool should_enter_hover_state = ShouldEnterHoveredState();
|
| + SetState(should_enter_hover_state ? STATE_HOVERED : STATE_NORMAL);
|
| + if (ink_drop_delegate())
|
| + ink_drop_delegate()->SetHovered(should_enter_hover_state);
|
| + } else {
|
| SetState(STATE_DISABLED);
|
| -
|
| - if (ink_drop_delegate())
|
| - ink_drop_delegate()->SetHovered(ShouldShowInkDropHover());
|
| + }
|
| }
|
|
|
| const char* CustomButton::GetClassName() const {
|
| @@ -349,6 +350,7 @@ void CustomButton::GetAccessibleState(ui::AXViewState* state) {
|
| }
|
|
|
| void CustomButton::VisibilityChanged(View* starting_from, bool visible) {
|
| + Button::VisibilityChanged(starting_from, visible);
|
| if (state_ == STATE_DISABLED)
|
| return;
|
| SetState(visible && ShouldEnterHoveredState() ? STATE_HOVERED : STATE_NORMAL);
|
|
|