| 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 2875b06fcf05582b9e28ea9af5c6f8f4bda53556..068b0dbb5d76b480e5288a5cc2261d5137778ebb 100644
|
| --- a/ui/views/controls/button/custom_button.cc
|
| +++ b/ui/views/controls/button/custom_button.cc
|
| @@ -129,14 +129,13 @@ 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);
|
| + ink_drop()->SetHovered(should_enter_hover_state);
|
| + } else {
|
| SetState(STATE_DISABLED);
|
| -
|
| - // TODO(bruthig): This should only be using the hover signal only and not the
|
| - // focus signal as well.
|
| - ink_drop()->SetHovered(ShouldShowInkDropHighlight());
|
| + }
|
| }
|
|
|
| const char* CustomButton::GetClassName() const {
|
| @@ -348,6 +347,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);
|
|
|