| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. | 3 // LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/views/controls/button/checkbox.h" | 5 #include "chrome/views/controls/button/checkbox.h" |
| 6 | 6 |
| 7 #include "chrome/common/gfx/chrome_canvas.h" | 7 #include "chrome/common/gfx/chrome_canvas.h" |
| 8 #include "chrome/views/controls/label.h" | 8 #include "chrome/views/controls/label.h" |
| 9 | 9 |
| 10 namespace views { | 10 namespace views { |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 ConvertPointToView(this, label_, &tmp); | 157 ConvertPointToView(this, label_, &tmp); |
| 158 return label_->HitTest(tmp); | 158 return label_->HitTest(tmp); |
| 159 } | 159 } |
| 160 | 160 |
| 161 //////////////////////////////////////////////////////////////////////////////// | 161 //////////////////////////////////////////////////////////////////////////////// |
| 162 // Checkbox, private: | 162 // Checkbox, private: |
| 163 | 163 |
| 164 void Checkbox::Init(const std::wstring& label_text) { | 164 void Checkbox::Init(const std::wstring& label_text) { |
| 165 set_minimum_size(gfx::Size(0, 0)); | 165 set_minimum_size(gfx::Size(0, 0)); |
| 166 label_ = new Label(label_text); | 166 label_ = new Label(label_text); |
| 167 label_->set_has_focus_border(true); |
| 167 label_->SetHorizontalAlignment(Label::ALIGN_LEFT); | 168 label_->SetHorizontalAlignment(Label::ALIGN_LEFT); |
| 168 AddChildView(label_); | 169 AddChildView(label_); |
| 169 } | 170 } |
| 170 | 171 |
| 171 } // namespace views | 172 } // namespace views |
| OLD | NEW |