| Index: views/controls/button/custom_button.cc
|
| ===================================================================
|
| --- views/controls/button/custom_button.cc (revision 22914)
|
| +++ views/controls/button/custom_button.cc (working copy)
|
| @@ -97,7 +97,7 @@
|
|
|
| bool CustomButton::OnMousePressed(const MouseEvent& e) {
|
| if (state_ != BS_DISABLED) {
|
| - if (IsTriggerableEvent(e) && HitTest(e.location()))
|
| + if (ShouldEnterPushedState(e) && HitTest(e.location()))
|
| SetState(BS_PUSHED);
|
| RequestFocus();
|
| }
|
| @@ -108,7 +108,7 @@
|
| if (state_ != BS_DISABLED) {
|
| if (!HitTest(e.location()))
|
| SetState(BS_NORMAL);
|
| - else if (IsTriggerableEvent(e))
|
| + else if (ShouldEnterPushedState(e))
|
| SetState(BS_PUSHED);
|
| else
|
| SetState(BS_HOT);
|
| @@ -214,6 +214,10 @@
|
| SchedulePaint();
|
| }
|
|
|
| +bool CustomButton::ShouldEnterPushedState(const MouseEvent& e) {
|
| + return IsTriggerableEvent(e);
|
| +}
|
| +
|
| ////////////////////////////////////////////////////////////////////////////////
|
| // CustomButton, private:
|
|
|
|
|