Chromium Code Reviews| Index: chrome/browser/ui/views/payments/payment_request_sheet_controller.cc |
| diff --git a/chrome/browser/ui/views/payments/payment_request_sheet_controller.cc b/chrome/browser/ui/views/payments/payment_request_sheet_controller.cc |
| index 6052121600bf91362124c395b28c2162db5bb34e..824fc860557d0abb28151fc73fce4121d3546bfa 100644 |
| --- a/chrome/browser/ui/views/payments/payment_request_sheet_controller.cc |
| +++ b/chrome/browser/ui/views/payments/payment_request_sheet_controller.cc |
| @@ -10,6 +10,7 @@ |
| #include "components/strings/grit/components_strings.h" |
| #include "ui/base/l10n/l10n_util.h" |
| #include "ui/views/background.h" |
| +#include "ui/views/border.h" |
| #include "ui/views/controls/button/md_text_button.h" |
| #include "ui/views/controls/scroll_view.h" |
| #include "ui/views/focus/focus_search.h" |
| @@ -231,6 +232,16 @@ PaymentRequestSheetController::CreatePaymentView() { |
| std::unique_ptr<views::View> PaymentRequestSheetController::CreateFooterView() { |
| std::unique_ptr<views::View> container = base::MakeUnique<views::View>(); |
| + // The horizontal distance between the right/left edges of the dialog and the |
| + // elements. |
| + constexpr int kFooterHorizontalInset = 16; |
| + // The vertical distance between footer elements and the top/bottom border |
| + // (the bottom border is the edge of the dialog). |
| + constexpr int kFooterVerticalInset = 16; |
|
sky
2017/05/05 14:36:39
optional: as these values are the same combine and
Bret
2017/05/06 00:36:43
Done.
|
| + container->SetBorder( |
| + views::CreateEmptyBorder(kFooterVerticalInset, kFooterHorizontalInset, |
| + kFooterVerticalInset, kFooterHorizontalInset)); |
| + |
| views::GridLayout* layout = new views::GridLayout(container.get()); |
| container->SetLayoutManager(layout); |
| @@ -241,14 +252,6 @@ std::unique_ptr<views::View> PaymentRequestSheetController::CreateFooterView() { |
| columns->AddColumn(views::GridLayout::TRAILING, views::GridLayout::CENTER, |
| 0, views::GridLayout::USE_PREF, 0, 0); |
| - // The horizontal distance between the right/left edges of the dialog and the |
| - // elements. |
| - constexpr int kFooterHorizontalInset = 16; |
| - // The vertical distance between footer elements and the top/bottom border |
| - // (the bottom border is the edge of the dialog). |
| - constexpr int kFooterVerticalInset = 16; |
| - layout->SetInsets(kFooterVerticalInset, kFooterHorizontalInset, |
| - kFooterVerticalInset, kFooterHorizontalInset); |
| layout->StartRow(0, 0); |
| std::unique_ptr<views::View> extra_view = CreateExtraFooterView(); |
| if (extra_view) |