summaryrefslogtreecommitdiffstats
path: root/views/controls/button/custom_button.cc
diff options
context:
space:
mode:
Diffstat (limited to 'views/controls/button/custom_button.cc')
-rw-r--r--views/controls/button/custom_button.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/views/controls/button/custom_button.cc b/views/controls/button/custom_button.cc
index f9a58f6..c7eadca 100644
--- a/views/controls/button/custom_button.cc
+++ b/views/controls/button/custom_button.cc
@@ -219,6 +219,20 @@ void CustomButton::ViewHierarchyChanged(bool is_add, View *parent,
SetState(BS_NORMAL);
}
+void CustomButton::SetHotTracked(bool flag) {
+ if (state_ != BS_DISABLED)
+ SetState(flag ? BS_HOT : BS_NORMAL);
+}
+
+bool CustomButton::IsHotTracked() const {
+ return state_ == BS_HOT;
+}
+
+void CustomButton::WillLoseFocus() {
+ if (IsHotTracked())
+ SetState(BS_NORMAL);
+}
+
////////////////////////////////////////////////////////////////////////////////
// CustomButton, AnimationDelegate implementation: