Commit 12e33346 authored by Edin Kadric's avatar Edin Kadric Committed by Commit Bot

Increase height of password combobox to match username field height.

Bug: 774530
Change-Id: I6ce46224cf1e39a5bd6a06d100dca2a0262923e5
Reviewed-on: https://chromium-review.googlesource.com/c/1365800Reviewed-by: default avatarVasilii Sukhanov <vasilii@chromium.org>
Commit-Queue: Edin Kadric <edinkadric@google.com>
Cr-Commit-Position: refs/heads/master@{#614699}
parent 4e4b9e15
......@@ -110,10 +110,13 @@ void BuildCredentialRows(views::GridLayout* layout,
password_label->SetHorizontalAlignment(gfx::HorizontalAlignment::ALIGN_LEFT);
int labels_width = std::max(username_label->GetPreferredSize().width(),
password_label->GetPreferredSize().width());
int fields_height = std::max(username_field->GetPreferredSize().height(),
password_field->GetPreferredSize().height());
layout->AddView(username_label.release(), 1, 1, views::GridLayout::LEADING,
views::GridLayout::FILL, labels_width, 0);
layout->AddView(username_field);
layout->AddView(username_field, 1, 1, views::GridLayout::FILL,
views::GridLayout::FILL, 0, fields_height);
layout->AddPaddingRow(views::GridLayout::kFixedSize,
ChromeLayoutProvider::Get()->GetDistanceMetric(
......@@ -127,7 +130,8 @@ void BuildCredentialRows(views::GridLayout* layout,
layout->StartRow(views::GridLayout::kFixedSize, type);
layout->AddView(password_label.release(), 1, 1, views::GridLayout::LEADING,
views::GridLayout::FILL, labels_width, 0);
layout->AddView(password_field);
layout->AddView(password_field, 1, 1, views::GridLayout::FILL,
views::GridLayout::FILL, 0, fields_height);
// The eye icon is also added to the layout if it was passed.
if (password_view_button) {
layout->AddView(password_view_button);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment