Chromium Code Reviews| 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 1b5d1e82ffbd705b332ed9ce3057a60a8d2da995..ef2c7eb0f8237db223cbdcfc4a95b256d208ea28 100644 |
| --- a/ui/views/controls/button/custom_button.cc |
| +++ b/ui/views/controls/button/custom_button.cc |
| @@ -228,12 +228,9 @@ void CustomButton::OnGestureEvent(ui::GestureEvent* event) { |
| } |
| if (event->type() == ui::ET_GESTURE_TAP && IsTriggerableEvent(*event)) { |
| - // Set the button state to hot and start the animation fully faded in. The |
| - // GESTURE_END event issued immediately after will set the state to |
| - // STATE_NORMAL beginning the fade out animation. See |
| - // http://crbug.com/131184. |
| - SetState(STATE_HOVERED); |
| - hover_animation_->Reset(1.0); |
| + // Since no hover state was shown on a tap down, do not show any |
| + // hover state after a tap. |
| + SetState(STATE_NORMAL); |
|
sadrul
2014/07/24 19:12:13
Does this actually cause any visual regression?
tdanderson
2014/07/25 17:16:10
Yes it does. After a tap is complete we no longer
tdresser
2014/07/25 17:24:20
I'm pretty sure we do want to see the hover state
tdanderson
2014/07/25 17:49:20
My point was that the HOVERED state shouldn't appe
tdanderson
2014/07/25 18:53:02
Looks like https://codereview.chromium.org/4163430
|
| NotifyClick(*event); |
| event->StopPropagation(); |
| } else if (event->type() == ui::ET_GESTURE_TAP_DOWN && |
| @@ -242,8 +239,7 @@ void CustomButton::OnGestureEvent(ui::GestureEvent* event) { |
| if (request_focus_on_press_) |
| RequestFocus(); |
| event->StopPropagation(); |
| - } else if (event->type() == ui::ET_GESTURE_TAP_CANCEL || |
| - event->type() == ui::ET_GESTURE_END) { |
| + } else if (event->type() == ui::ET_GESTURE_TAP_CANCEL) { |
| SetState(STATE_NORMAL); |
| } |
| if (!event->handled()) |