Skip to content

Commit

Permalink
Fix painting issue with maximize button in aura.
Browse files Browse the repository at this point in the history
Fix invalid transition in custom_button.cc When the mouse is released on a custom button, the state is set to BS_NORMAL if the hit test fails.
The following two transitions should have the same final effect.
BS_PRESSED -> BS_HOT -> BS_NORMAL
BS_PRESSED -> BS_NORMAL

Review URL: http://codereview.chromium.org/8437003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108671 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
pkotwicz@chromium.org committed Nov 4, 2011
1 parent 11ba410 commit 86547c1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion views/controls/button/custom_button.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ void CustomButton::SetState(ButtonState state) {
if (state_ == BS_NORMAL && state == BS_HOT) {
// Button is hovered from a normal state, start hover animation.
hover_animation_->Show();
} else if (state_ == BS_HOT && state == BS_NORMAL) {
} else if ((state_ == BS_HOT || state_ == BS_PUSHED)
&& state == BS_NORMAL) {
// Button is returning to a normal state from hover, start hover
// fade animation.
hover_animation_->Hide();
Expand Down

0 comments on commit 86547c1

Please sign in to comment.