| Index: chrome/browser/ui/views/login_view.cc
|
| diff --git a/chrome/browser/ui/views/login_view.cc b/chrome/browser/ui/views/login_view.cc
|
| index 2b50ecb6c7cb129655b11b898fceb3ecb60a56e4..4976c0170399f773f5d2dc8cea5c79527d1c84aa 100644
|
| --- a/chrome/browser/ui/views/login_view.cc
|
| +++ b/chrome/browser/ui/views/login_view.cc
|
| @@ -4,7 +4,7 @@
|
|
|
| #include "chrome/browser/ui/views/login_view.h"
|
|
|
| -#include "chrome/browser/ui/views/harmony/layout_delegate.h"
|
| +#include "chrome/browser/ui/views/harmony/chrome_views_layout_delegate.h"
|
| #include "chrome/browser/ui/views/layout_utils.h"
|
| #include "components/strings/grit/components_strings.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
| @@ -33,7 +33,7 @@ LoginView::LoginView(const base::string16& authority,
|
| authority_label_(new views::Label(authority)),
|
| message_label_(nullptr),
|
| login_model_(login_model_data ? login_model_data->model : nullptr) {
|
| - LayoutDelegate* layout_delegate = LayoutDelegate::Get();
|
| + ChromeViewsLayoutDelegate* layout_delegate = ChromeViewsLayoutDelegate::Get();
|
| password_field_->SetTextInputType(ui::TEXT_INPUT_TYPE_PASSWORD);
|
|
|
| authority_label_->SetMultiLine(true);
|
| @@ -59,9 +59,8 @@ LoginView::LoginView(const base::string16& authority,
|
| column_set->AddColumn(layout_delegate->GetControlLabelGridAlignment(),
|
| GridLayout::CENTER, 0, GridLayout::USE_PREF, 0, 0);
|
| column_set->AddPaddingColumn(
|
| - 0,
|
| - layout_delegate->GetMetric(
|
| - LayoutDelegate::Metric::RELATED_CONTROL_HORIZONTAL_SPACING));
|
| + 0, layout_delegate->GetDistanceMetric(
|
| + ChromeDistanceMetric::RELATED_CONTROL_HORIZONTAL));
|
| column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 1,
|
| GridLayout::USE_PREF, 0, 0);
|
| if (layout_delegate->UseExtraDialogPadding())
|
| @@ -74,27 +73,23 @@ LoginView::LoginView(const base::string16& authority,
|
| message_label_->SetMultiLine(true);
|
| message_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
|
| message_label_->SetAllowCharacterBreak(true);
|
| - layout->AddPaddingRow(
|
| - 0,
|
| - layout_delegate->GetMetric(
|
| - LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
|
| + layout->AddPaddingRow(0,
|
| + layout_delegate->GetDistanceMetric(
|
| + ChromeDistanceMetric::RELATED_CONTROL_VERTICAL));
|
| layout->StartRow(0, single_column_view_set_id);
|
| layout->AddView(message_label_);
|
| }
|
|
|
| layout->AddPaddingRow(
|
| - 0,
|
| - layout_delegate->GetMetric(
|
| - LayoutDelegate::Metric::UNRELATED_CONTROL_VERTICAL_SPACING_LARGE));
|
| + 0, layout_delegate->GetDistanceMetric(
|
| + ChromeDistanceMetric::UNRELATED_CONTROL_VERTICAL_LARGE));
|
|
|
| layout->StartRow(0, labels_column_set_id);
|
| layout->AddView(username_label_);
|
| layout->AddView(username_field_);
|
|
|
| - layout->AddPaddingRow(
|
| - 0,
|
| - layout_delegate->GetMetric(
|
| - LayoutDelegate::Metric::RELATED_CONTROL_VERTICAL_SPACING));
|
| + layout->AddPaddingRow(0, layout_delegate->GetDistanceMetric(
|
| + ChromeDistanceMetric::RELATED_CONTROL_VERTICAL));
|
|
|
| layout->StartRow(0, labels_column_set_id);
|
| layout->AddView(password_label_);
|
| @@ -102,9 +97,8 @@ LoginView::LoginView(const base::string16& authority,
|
|
|
| if (layout_delegate->UseExtraDialogPadding()) {
|
| layout->AddPaddingRow(
|
| - 0,
|
| - layout_delegate->GetMetric(
|
| - LayoutDelegate::Metric::UNRELATED_CONTROL_VERTICAL_SPACING));
|
| + 0, layout_delegate->GetDistanceMetric(
|
| + ChromeDistanceMetric::UNRELATED_CONTROL_VERTICAL));
|
| }
|
|
|
| if (login_model_data) {
|
|
|