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

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

Issue 2859193004: Remove GridLayout::SetInsets in favor of an empty border on the host. (Closed)
Patch Set: edits 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/order_summary_view_controller.cc
diff --git a/chrome/browser/ui/views/payments/order_summary_view_controller.cc b/chrome/browser/ui/views/payments/order_summary_view_controller.cc
index c8bddb12277fe65fa034e34d6c2f82369236ad5e..aa3b00bac6b2a634a2856ba525aa79e18e05946d 100644
--- a/chrome/browser/ui/views/payments/order_summary_view_controller.cc
+++ b/chrome/browser/ui/views/payments/order_summary_view_controller.cc
@@ -47,16 +47,15 @@ std::unique_ptr<views::View> CreateLineItemView(const base::string16& label,
row->SetBorder(payments::CreatePaymentRequestRowBorder());
views::GridLayout* layout = new views::GridLayout(row.get());
+ row->SetLayoutManager(layout);
// The vertical spacing for these rows is slightly different than the spacing
// spacing for clickable rows, so don't use kPaymentRequestRowVerticalInsets.
constexpr int kRowVerticalInset = 12;
- layout->SetInsets(kRowVerticalInset,
- payments::kPaymentRequestRowHorizontalInsets,
- kRowVerticalInset,
- payments::kPaymentRequestRowHorizontalInsets);
+ row->SetBorder(views::CreateEmptyBorder(
+ kRowVerticalInset, payments::kPaymentRequestRowHorizontalInsets,
+ kRowVerticalInset, payments::kPaymentRequestRowHorizontalInsets));
- row->SetLayoutManager(layout);
views::ColumnSet* columns = layout->AddColumnSet(0);
// The first column has resize_percent = 1 so that it streches all the way
// across the row up to the amount label. This way the first label elides as

Powered by Google App Engine
This is Rietveld 408576698