Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1648)

Unified Diff: chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc

Issue 2871873003: [Payments] Fix up field widths in desktop editors. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc
diff --git a/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc b/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc
index 7f0e8941757553fee005973c409b04247162ea92..fb7511343671558363013a132dfd9a1c4b059594 100644
--- a/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc
+++ b/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc
@@ -106,9 +106,12 @@ CreditCardEditorViewController::CreateHeaderView() {
// 9dp is required between the first row (label) and second row (icons).
constexpr int kRowVerticalSpacing = 9;
+ // 6dp is added to the bottom padding, for a total of 12 between the icons and
+ // the first input field.
+ constexpr int kRowBottomPadding = 6;
views::BoxLayout* layout = new views::BoxLayout(
views::BoxLayout::kVertical, payments::kPaymentRequestRowHorizontalInsets,
- 0, kRowVerticalSpacing);
+ kRowBottomPadding, kRowVerticalSpacing);
layout->set_main_axis_alignment(views::BoxLayout::MAIN_AXIS_ALIGNMENT_START);
layout->set_cross_axis_alignment(
views::BoxLayout::CROSS_AXIS_ALIGNMENT_START);
@@ -152,10 +155,10 @@ std::vector<EditorField> CreditCardEditorViewController::GetFieldDefinitions() {
return std::vector<EditorField>{
{autofill::CREDIT_CARD_NUMBER,
l10n_util::GetStringUTF16(IDS_AUTOFILL_FIELD_LABEL_CREDIT_CARD_NUMBER),
- EditorField::LengthHint::HINT_LONG, /* required= */ true},
+ EditorField::LengthHint::HINT_SHORT, /* required= */ true},
{autofill::CREDIT_CARD_NAME_FULL,
l10n_util::GetStringUTF16(IDS_AUTOFILL_FIELD_LABEL_NAME_ON_CARD),
- EditorField::LengthHint::HINT_LONG, /* required= */ true},
+ EditorField::LengthHint::HINT_SHORT, /* required= */ true},
{autofill::CREDIT_CARD_EXP_MONTH,
l10n_util::GetStringUTF16(IDS_AUTOFILL_FIELD_LABEL_EXPIRATION_MONTH),
EditorField::LengthHint::HINT_SHORT, /* required= */ true,

Powered by Google App Engine
This is Rietveld 408576698