summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornkostylev@chromium.org <nkostylev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-01 20:43:41 +0000
committernkostylev@chromium.org <nkostylev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-01 20:43:41 +0000
commitfa43fc5703c467fd192a072227a32bf33760cbe3 (patch)
tree7c6646f6097f4b260ca9130db62170ab6e97396b
parent2bc9577f09d9af3348f19c5e43651d9a417e5c7c (diff)
downloadchromium_src-fa43fc5703c467fd192a072227a32bf33760cbe3.zip
chromium_src-fa43fc5703c467fd192a072227a32bf33760cbe3.tar.gz
chromium_src-fa43fc5703c467fd192a072227a32bf33760cbe3.tar.bz2
[cros] Use same textfield settings across existing/new user pods and screen lock.
BUG=chromium-os:9811 TEST=Manual Review URL: http://codereview.chromium.org/5473001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67899 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/chromeos/login/existing_user_view.cc1
-rw-r--r--chrome/browser/chromeos/login/new_user_view.cc2
-rw-r--r--chrome/browser/chromeos/login/textfield_with_margin.cc8
-rw-r--r--chrome/browser/chromeos/login/textfield_with_margin.h7
4 files changed, 11 insertions, 7 deletions
diff --git a/chrome/browser/chromeos/login/existing_user_view.cc b/chrome/browser/chromeos/login/existing_user_view.cc
index abe1eb2..d5bb4c3 100644
--- a/chrome/browser/chromeos/login/existing_user_view.cc
+++ b/chrome/browser/chromeos/login/existing_user_view.cc
@@ -75,7 +75,6 @@ void ExistingUserView::RecreateFields() {
password_field_->set_background(
views::Background::CreateVerticalGradientBackground(
kBackgroundColorTop, kBackgroundColorBottom));
- CorrectTextfieldFontSize(password_field_);
password_field_->SetFocusable(true);
password_field_->SetController(user_controller_);
AddChildView(password_field_);
diff --git a/chrome/browser/chromeos/login/new_user_view.cc b/chrome/browser/chromeos/login/new_user_view.cc
index 5bdf8ad..974ad66 100644
--- a/chrome/browser/chromeos/login/new_user_view.cc
+++ b/chrome/browser/chromeos/login/new_user_view.cc
@@ -151,12 +151,10 @@ void NewUserView::Init() {
splitter_down2_ = CreateSplitter(kSplitterDown2Color);
username_field_ = new UsernameField();
- CorrectTextfieldFontSize(username_field_);
username_field_->set_background(new CopyBackground(this));
AddChildView(username_field_);
password_field_ = new TextfieldWithMargin(views::Textfield::STYLE_PASSWORD);
- CorrectTextfieldFontSize(password_field_);
password_field_->set_background(new CopyBackground(this));
AddChildView(password_field_);
diff --git a/chrome/browser/chromeos/login/textfield_with_margin.cc b/chrome/browser/chromeos/login/textfield_with_margin.cc
index 8ad4cee..44d3432 100644
--- a/chrome/browser/chromeos/login/textfield_with_margin.cc
+++ b/chrome/browser/chromeos/login/textfield_with_margin.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/chromeos/login/textfield_with_margin.h"
+#include "chrome/browser/chromeos/login/helper.h"
+
namespace {
// Holds ratio of the margin to the preferred text height.
@@ -17,6 +19,12 @@ const int kVerticalMargin = 3;
namespace chromeos {
TextfieldWithMargin::TextfieldWithMargin() {
+ CorrectTextfieldFontSize(this);
+}
+
+TextfieldWithMargin::TextfieldWithMargin(views::Textfield::StyleFlags style)
+ : Textfield(style) {
+ CorrectTextfieldFontSize(this);
}
void TextfieldWithMargin::Layout() {
diff --git a/chrome/browser/chromeos/login/textfield_with_margin.h b/chrome/browser/chromeos/login/textfield_with_margin.h
index 338f79d..1bf3e54 100644
--- a/chrome/browser/chromeos/login/textfield_with_margin.h
+++ b/chrome/browser/chromeos/login/textfield_with_margin.h
@@ -15,11 +15,10 @@ namespace chromeos {
class TextfieldWithMargin : public views::Textfield {
public:
TextfieldWithMargin();
+ explicit TextfieldWithMargin(views::Textfield::StyleFlags style);
- explicit TextfieldWithMargin(views::Textfield::StyleFlags style)
- : Textfield(style) {}
-
- // Reimplements views::Textfield.
+ protected:
+ // Overridden from views::View:
virtual void Layout();
private: