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

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

Issue 2859193004: Remove GridLayout::SetInsets in favor of an empty border on the host. (Closed)
Patch Set: missed a merge problem 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/payment_sheet_view_controller.cc
diff --git a/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc b/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc
index 5caf7e9944c541099fc9d1d633856c499bc8d3bf..089f140c7d6e23701fef27e0fe9f52048c9f3472 100644
--- a/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc
+++ b/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc
@@ -154,17 +154,16 @@ std::unique_ptr<views::Button> CreatePaymentSheetRow(
bool clickable,
bool extra_trailing_inset,
int name_column_width) {
+ const int trailing_inset = extra_trailing_inset
+ ? kPaymentRequestRowHorizontalInsets +
+ kPaymentRequestRowExtraRightInset
+ : kPaymentRequestRowHorizontalInsets;
+ const gfx::Insets row_insets(
+ kPaymentRequestRowVerticalInsets, kPaymentRequestRowHorizontalInsets,
+ kPaymentRequestRowVerticalInsets, trailing_inset);
std::unique_ptr<PaymentRequestRowView> row =
- base::MakeUnique<PaymentRequestRowView>(listener, clickable);
+ base::MakeUnique<PaymentRequestRowView>(listener, clickable, row_insets);
views::GridLayout* layout = new views::GridLayout(row.get());
-
- int trailing_inset = extra_trailing_inset
- ? kPaymentRequestRowHorizontalInsets +
- kPaymentRequestRowExtraRightInset
- : kPaymentRequestRowHorizontalInsets;
- layout->SetInsets(kPaymentRequestRowVerticalInsets,
- kPaymentRequestRowHorizontalInsets,
- kPaymentRequestRowVerticalInsets, trailing_inset);
row->SetLayoutManager(layout);
views::ColumnSet* columns = layout->AddColumnSet(0);

Powered by Google App Engine
This is Rietveld 408576698