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

Side by Side Diff: chrome/views/controls/button/checkbox.cc

Issue 93142: Checkbox/RadioButton labels have to reserve space for the focus rects, even i... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/views/controls/label.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/views/controls/label.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698