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

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

Issue 2847813003: [Web Payments] Fix alignment of certain Payment Sheet labels. (Closed)
Patch Set: Apply the same treatment to the shipping option labels Created 3 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/payment_sheet_view_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/payments/payment_request_views_util.cc
diff --git a/chrome/browser/ui/views/payments/payment_request_views_util.cc b/chrome/browser/ui/views/payments/payment_request_views_util.cc
index 375ec5fe136e76eef67691390b2bd4e16e37d99c..7117b7d2fcee0f24d7cab4d7576b5e0f4e6f6bcd 100644
--- a/chrome/browser/ui/views/payments/payment_request_views_util.cc
+++ b/chrome/browser/ui/views/payments/payment_request_views_util.cc
@@ -80,18 +80,21 @@ std::unique_ptr<views::View> GetThreeLineLabel(AddressStyleType type,
label->SetFontList(font_list.DeriveWithWeight(gfx::Font::Weight::BOLD));
}
label->set_id(static_cast<int>(DialogViewID::THREE_LINE_LABEL_LINE_1));
+ label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
container->AddChildView(label.release());
}
if (!s2.empty()) {
std::unique_ptr<views::Label> label = base::MakeUnique<views::Label>(s2);
label->set_id(static_cast<int>(DialogViewID::THREE_LINE_LABEL_LINE_2));
+ label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
container->AddChildView(label.release());
}
if (!s3.empty()) {
std::unique_ptr<views::Label> label = base::MakeUnique<views::Label>(s3);
label->set_id(static_cast<int>(DialogViewID::THREE_LINE_LABEL_LINE_3));
+ label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
container->AddChildView(label.release());
}
@@ -289,12 +292,14 @@ std::unique_ptr<views::View> CreateShippingOptionLabel(
std::unique_ptr<views::Label> shipping_label =
base::MakeUnique<views::Label>(
base::UTF8ToUTF16(shipping_option->label));
+ shipping_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
shipping_label->set_id(
static_cast<int>(DialogViewID::SHIPPING_OPTION_DESCRIPTION));
container->AddChildView(shipping_label.release());
std::unique_ptr<views::Label> amount_label =
base::MakeUnique<views::Label>(formatted_amount);
+ amount_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
amount_label->set_id(
static_cast<int>(DialogViewID::SHIPPING_OPTION_AMOUNT));
container->AddChildView(amount_label.release());
« no previous file with comments | « no previous file | chrome/browser/ui/views/payments/payment_sheet_view_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698