summaryrefslogtreecommitdiffstats
path: root/views/controls/button
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-22 21:15:28 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-22 21:15:28 +0000
commit5c8899c6e31f922eae11e20367d71acde966d2ce (patch)
tree6fe3d13c20a6b65c1ec59adaa629855bd01aa75e /views/controls/button
parentf0e1d9fa17f7f2fd64d29b7c797baab0000b9125 (diff)
downloadchromium_src-5c8899c6e31f922eae11e20367d71acde966d2ce.zip
chromium_src-5c8899c6e31f922eae11e20367d71acde966d2ce.tar.gz
chromium_src-5c8899c6e31f922eae11e20367d71acde966d2ce.tar.bz2
Rewrite/clean up a bunch of label.cc to fix the following problems:
* Focus rects on single-line labels could be the wrong height. Turns out SizeStringInt() doesn't adjust the height of a single-line string because it assumes you know your font's height. Passing in a default height of the font height fixed this. * Remove a bunch of confusing code/functions that did totally different things in single- and multi-line mode, and make things handle both modes and do what you'd expect. * Make functions be in the same order in the header and .cc files. * Make several things const. * Simplify. BUG=38679 TEST=Radio buttons in content blocked bubbles do not produce weird-looking focus rects when clicked. The third page of the Options dialog lays out correctly, and checkboxes don't produce too-wide focus rects when clicked. In RTL languages, the Options dialog still looks right, with no string clipping. Review URL: http://codereview.chromium.org/1072007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42256 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/button')
-rw-r--r--views/controls/button/checkbox.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/views/controls/button/checkbox.cc b/views/controls/button/checkbox.cc
index 1dcb80a..ac756cd 100644
--- a/views/controls/button/checkbox.cc
+++ b/views/controls/button/checkbox.cc
@@ -207,7 +207,7 @@ void Checkbox::Init(const std::wstring& label_text) {
// Checkboxs don't need to enforce a minimum size.
set_ignore_minimum_size(true);
label_ = new Label(label_text);
- label_->set_has_focus_border(true);
+ label_->SetHasFocusBorder(true);
label_->SetHorizontalAlignment(Label::ALIGN_LEFT);
AddChildView(label_);
}