Commit b424a592 authored by Rouslan Solomakhin's avatar Rouslan Solomakhin Committed by Commit Bot

[Payments] Use themed background color.

Bug: 743173
Change-Id: Ie31e92bff4fda5907d45b931dd79caeac79b36ff
Reviewed-on: https://chromium-review.googlesource.com/669319Reviewed-by: default avataranthonyvd <anthonyvd@chromium.org>
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#532956}
parent 84a1ce2c
......@@ -389,7 +389,8 @@ void PaymentRequestDialogView::SetupSpinnerOverlay() {
throbber_overlay_.SetVisible(false);
// The throbber overlay has to have a solid white background to hide whatever
// would be under it.
throbber_overlay_.SetBackground(views::CreateSolidBackground(SK_ColorWHITE));
throbber_overlay_.SetBackground(views::CreateThemedSolidBackground(
&throbber_overlay_, ui::NativeTheme::kColorId_WindowBackground));
views::GridLayout* layout = throbber_overlay_.SetLayoutManager(
std::make_unique<views::GridLayout>(&throbber_overlay_));
......
......@@ -160,7 +160,8 @@ class BorderedScrollView : public views::ScrollView {
};
BorderedScrollView() : views::ScrollView() {
SetBackgroundColor(SK_ColorWHITE);
SetBackground(views::CreateThemedSolidBackground(
this, ui::NativeTheme::kColorId_WindowBackground));
SetBorder(views::CreateBorderPainter(
std::make_unique<BorderedScrollViewBorderPainter>(
GetNativeTheme()->GetSystemColor(
......@@ -212,7 +213,8 @@ std::unique_ptr<views::View> PaymentRequestSheetController::CreateView() {
if (GetSheetId(&sheet_id))
view->set_id(static_cast<int>(sheet_id));
view->SetBackground(views::CreateSolidBackground(SK_ColorWHITE));
view->SetBackground(views::CreateThemedSolidBackground(
view.get(), ui::NativeTheme::kColorId_WindowBackground));
// Paint the sheets to layers, otherwise the MD buttons (which do paint to a
// layer) won't do proper clipping.
......@@ -250,7 +252,8 @@ std::unique_ptr<views::View> PaymentRequestSheetController::CreateView() {
content_view_ = new views::View;
content_view_->SetPaintToLayer();
content_view_->layer()->SetFillsBoundsOpaquely(true);
content_view_->SetBackground(views::CreateSolidBackground(SK_ColorWHITE));
content_view_->SetBackground(views::CreateThemedSolidBackground(
content_view_, ui::NativeTheme::kColorId_WindowBackground));
content_view_->set_id(static_cast<int>(DialogViewID::CONTENT_VIEW));
pane_layout->AddView(content_view_);
pane_->SizeToPreferredSize();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment