diff options
-rw-r--r-- | views/controls/button/checkbox.cc | 12 | ||||
-rw-r--r-- | views/controls/button/checkbox.h | 7 |
2 files changed, 13 insertions, 6 deletions
diff --git a/views/controls/button/checkbox.cc b/views/controls/button/checkbox.cc index cba0aaf..f4594be 100644 --- a/views/controls/button/checkbox.cc +++ b/views/controls/button/checkbox.cc @@ -1,6 +1,6 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this -// source code is governed by a BSD-style license that can be found in the -// LICENSE file. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. #include "views/controls/button/checkbox.h" @@ -96,6 +96,12 @@ void Checkbox::Layout() { native_wrapper_->GetView()->Layout(); } +void Checkbox::SetEnabled(bool enabled) { + NativeButton::SetEnabled(enabled); + if (label_) + label_->SetEnabled(enabled); +} + void Checkbox::PaintFocusBorder(gfx::Canvas* canvas) { // Our focus border is rendered by the label, so we don't do anything here. } diff --git a/views/controls/button/checkbox.h b/views/controls/button/checkbox.h index e138885..8274070 100644 --- a/views/controls/button/checkbox.h +++ b/views/controls/button/checkbox.h @@ -1,6 +1,6 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this -// source code is governed by a BSD-style license that can be found in the -// LICENSE file. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. #ifndef VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ #define VIEWS_CONTROLS_BUTTON_CHECKBOX_H_ @@ -41,6 +41,7 @@ class Checkbox : public NativeButton { // Overridden from View: virtual gfx::Size GetPreferredSize(); virtual void Layout(); + virtual void SetEnabled(bool enabled); virtual void PaintFocusBorder(gfx::Canvas* canvas); virtual View* GetViewForPoint(const gfx::Point& point); virtual View* GetViewForPoint(const gfx::Point& point, |