diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-09 22:33:48 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-09 22:33:48 +0000 |
commit | 5aaf1c1222c440c9c5a3b79c39ceda881660e914 (patch) | |
tree | 68f6b073216d8e91a9a1d8fc782b83d72e66d081 /views/controls/button/checkbox.cc | |
parent | 4cbad9bf84684eda82c9d55b82db113496c7fb9f (diff) | |
download | chromium_src-5aaf1c1222c440c9c5a3b79c39ceda881660e914.zip chromium_src-5aaf1c1222c440c9c5a3b79c39ceda881660e914.tar.gz chromium_src-5aaf1c1222c440c9c5a3b79c39ceda881660e914.tar.bz2 |
Disable lables for disabled checkboxes. Original patch by Philippe Beaudoin (see http://codereview.chromium.org/567026 ), r=ben,me.
BUG=22982
TEST=Go to Options->Personal Stuff->Import data from another browser...->From "Google Toolbar". Labels for disabled checkboxes should also look disabled.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38523 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/button/checkbox.cc')
-rw-r--r-- | views/controls/button/checkbox.cc | 12 |
1 files changed, 9 insertions, 3 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. } |