Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(350)

Unified Diff: views/controls/button/checkbox.cc

Issue 6976048: views: Add OnEnabledChanged() method to View class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix DisableOnHover test? Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « views/controls/button/checkbox.h ('k') | views/controls/button/custom_button.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/button/checkbox.cc
diff --git a/views/controls/button/checkbox.cc b/views/controls/button/checkbox.cc
index 71116cdd811f1c02bab97a029ef209b10136b350..8221b563e054a56e025b8a130cd8fa0554e7b41c 100644
--- a/views/controls/button/checkbox.cc
+++ b/views/controls/button/checkbox.cc
@@ -90,10 +90,10 @@ int Checkbox::GetHeightForWidth(int w) {
return label_->GetHeightForWidth(std::max(prefsize.height(), w - width));
}
-void Checkbox::SetEnabled(bool enabled) {
- NativeButtonBase::SetEnabled(enabled);
+void Checkbox::OnEnabledChanged() {
+ NativeButtonBase::OnEnabledChanged();
if (label_)
- label_->SetEnabled(enabled);
+ label_->SetEnabled(IsEnabled());
}
void Checkbox::Layout() {
« no previous file with comments | « views/controls/button/checkbox.h ('k') | views/controls/button/custom_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698