diff options
author | nkostylev@chromium.org <nkostylev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-19 17:13:08 +0000 |
---|---|---|
committer | nkostylev@chromium.org <nkostylev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-19 17:13:08 +0000 |
commit | 4a921153c5a3aefedb3b148933cf80a51b0aec14 (patch) | |
tree | b5f6460deeef58dd667a828ca85b0c7e61b16446 /chrome/browser/chromeos | |
parent | 8e38341c65360b48c32b88c58d6ac490516c0c0c (diff) | |
download | chromium_src-4a921153c5a3aefedb3b148933cf80a51b0aec14.zip chromium_src-4a921153c5a3aefedb3b148933cf80a51b0aec14.tar.gz chromium_src-4a921153c5a3aefedb3b148933cf80a51b0aec14.tar.bz2 |
[cros] Proper layout for user pod password field.
Make sure controls are focused after language change.
BUG=chromium-os:7707
TEST=Manual.
Review URL: http://codereview.chromium.org/3846006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63060 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos')
-rw-r--r-- | chrome/browser/chromeos/login/existing_user_controller.cc | 1 | ||||
-rw-r--r-- | chrome/browser/chromeos/login/existing_user_view.cc | 14 | ||||
-rw-r--r-- | chrome/browser/chromeos/login/new_user_view.cc | 2 |
3 files changed, 5 insertions, 12 deletions
diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc index 269f4d7..c3b038b 100644 --- a/chrome/browser/chromeos/login/existing_user_controller.cc +++ b/chrome/browser/chromeos/login/existing_user_controller.cc @@ -318,6 +318,7 @@ void ExistingUserController::OnUserSelected(UserController* source) { if (new_selected_index != selected_view_index_ && selected_view_index_ != kNotSelected) { controllers_[selected_view_index_]->ClearAndEnableFields(); + controllers_[new_selected_index]->ClearAndEnableFields(); login_performer_.reset(NULL); num_login_attempts_ = 0; } diff --git a/chrome/browser/chromeos/login/existing_user_view.cc b/chrome/browser/chromeos/login/existing_user_view.cc index 93fa126..919f530 100644 --- a/chrome/browser/chromeos/login/existing_user_view.cc +++ b/chrome/browser/chromeos/login/existing_user_view.cc @@ -9,12 +9,10 @@ #include "chrome/browser/chromeos/login/wizard_accessibility_helper.h" #include "grit/generated_resources.h" #include "views/focus/focus_manager.h" -#include "views/grid_layout.h" +#include "views/fill_layout.h" namespace chromeos { -using views::GridLayout; - // Textfield with custom processing for Tab/Shift+Tab to select entries. class UserEntryTextfield : public views::Textfield { public: @@ -61,21 +59,15 @@ ExistingUserView::ExistingUserView(UserController* uc) void ExistingUserView::RecreateFields() { if (password_field_ == NULL) { + SetLayoutManager(new views::FillLayout); password_field_ = new UserEntryTextfield(user_controller_, views::Textfield::STYLE_PASSWORD); password_field_->SetFocusable(true); password_field_->SetController(user_controller_); + AddChildView(password_field_); } password_field_->set_text_to_display_when_empty( l10n_util::GetStringUTF16(IDS_LOGIN_POD_EMPTY_PASSWORD_TEXT)); - GridLayout* layout = new GridLayout(this); - // TODO(nkostylev): Switch to FillLayout. - SetLayoutManager(layout); - views::ColumnSet* column_set = layout->AddColumnSet(0); - column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1, - GridLayout::USE_PREF, 0, 0); - layout->StartRow(0, 0); - layout->AddView(password_field_); Layout(); SchedulePaint(); } diff --git a/chrome/browser/chromeos/login/new_user_view.cc b/chrome/browser/chromeos/login/new_user_view.cc index ae97457..7c1b841 100644 --- a/chrome/browser/chromeos/login/new_user_view.cc +++ b/chrome/browser/chromeos/login/new_user_view.cc @@ -15,7 +15,6 @@ #include "app/resource_bundle.h" #include "base/callback.h" #include "base/command_line.h" -#include "base/logging.h" #include "base/message_loop.h" #include "base/process_util.h" #include "base/string_util.h" @@ -270,6 +269,7 @@ void NewUserView::OnLocaleChanged() { Layout(); SchedulePaint(); + RequestFocus(); } void NewUserView::RequestFocus() { |