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

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: 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/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 7e60f658b224c48bfbf1345bf3e154bfde93a4b7..bc613c305734a704df7b93cb659bd6c6075d7571 100644
--- a/chrome/browser/ui/views/payments/order_summary_view_controller.cc
+++ b/chrome/browser/ui/views/payments/order_summary_view_controller.cc
@@ -44,21 +44,20 @@ std::unique_ptr<views::View> CreateLineItemView(const base::string16& label,
DialogViewID amount_label_id) {
std::unique_ptr<views::View> row = base::MakeUnique<views::View>();
- row->SetBorder(payments::CreatePaymentRequestRowBorder(
- row->GetNativeTheme()->GetSystemColor(
- ui::NativeTheme::kColorId_SeparatorColor)));
-
- views::GridLayout* layout = new views::GridLayout(row.get());
-
// The vertical spacing for these rows is slightly different than the spacing
// spacing for clickable rows, so don't use kPaymentRequestRowVerticalInsets.
constexpr int kRowVerticalInset = 4;
- layout->SetInsets(kRowVerticalInset,
- payments::kPaymentRequestRowHorizontalInsets,
- kRowVerticalInset,
- payments::kPaymentRequestRowHorizontalInsets);
+ const gfx::Insets row_insets(
+ kRowVerticalInset, payments::kPaymentRequestRowHorizontalInsets,
+ kRowVerticalInset, payments::kPaymentRequestRowHorizontalInsets);
+ row->SetBorder(payments::CreatePaymentRequestRowBorder(
+ row->GetNativeTheme()->GetSystemColor(
+ ui::NativeTheme::kColorId_SeparatorColor),
+ row_insets));
+ views::GridLayout* layout = new views::GridLayout(row.get());
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