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() { ...@@ -389,7 +389,8 @@ void PaymentRequestDialogView::SetupSpinnerOverlay() {
throbber_overlay_.SetVisible(false); throbber_overlay_.SetVisible(false);
// The throbber overlay has to have a solid white background to hide whatever // The throbber overlay has to have a solid white background to hide whatever
// would be under it. // 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( views::GridLayout* layout = throbber_overlay_.SetLayoutManager(
std::make_unique<views::GridLayout>(&throbber_overlay_)); std::make_unique<views::GridLayout>(&throbber_overlay_));
......
...@@ -160,7 +160,8 @@ class BorderedScrollView : public views::ScrollView { ...@@ -160,7 +160,8 @@ class BorderedScrollView : public views::ScrollView {
}; };
BorderedScrollView() : views::ScrollView() { BorderedScrollView() : views::ScrollView() {
SetBackgroundColor(SK_ColorWHITE); SetBackground(views::CreateThemedSolidBackground(
this, ui::NativeTheme::kColorId_WindowBackground));
SetBorder(views::CreateBorderPainter( SetBorder(views::CreateBorderPainter(
std::make_unique<BorderedScrollViewBorderPainter>( std::make_unique<BorderedScrollViewBorderPainter>(
GetNativeTheme()->GetSystemColor( GetNativeTheme()->GetSystemColor(
...@@ -212,7 +213,8 @@ std::unique_ptr<views::View> PaymentRequestSheetController::CreateView() { ...@@ -212,7 +213,8 @@ std::unique_ptr<views::View> PaymentRequestSheetController::CreateView() {
if (GetSheetId(&sheet_id)) if (GetSheetId(&sheet_id))
view->set_id(static_cast<int>(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 // Paint the sheets to layers, otherwise the MD buttons (which do paint to a
// layer) won't do proper clipping. // layer) won't do proper clipping.
...@@ -250,7 +252,8 @@ std::unique_ptr<views::View> PaymentRequestSheetController::CreateView() { ...@@ -250,7 +252,8 @@ std::unique_ptr<views::View> PaymentRequestSheetController::CreateView() {
content_view_ = new views::View; content_view_ = new views::View;
content_view_->SetPaintToLayer(); content_view_->SetPaintToLayer();
content_view_->layer()->SetFillsBoundsOpaquely(true); 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)); content_view_->set_id(static_cast<int>(DialogViewID::CONTENT_VIEW));
pane_layout->AddView(content_view_); pane_layout->AddView(content_view_);
pane_->SizeToPreferredSize(); 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