| Index: chrome/browser/ui/views/autofill/autofill_dialog_views.cc
|
| diff --git a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
|
| index 01a6cad2a21f3aa0d414558360f5c2f04fb7b733..ddb0d72c00822d8dcc18998dac8b00afa7d6caf2 100644
|
| --- a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
|
| +++ b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
|
| @@ -35,6 +35,7 @@
|
| #include "ui/base/resource/resource_bundle.h"
|
| #include "ui/gfx/animation/animation_delegate.h"
|
| #include "ui/gfx/canvas.h"
|
| +#include "ui/gfx/color_utils.h"
|
| #include "ui/gfx/path.h"
|
| #include "ui/gfx/point.h"
|
| #include "ui/gfx/skia_util.h"
|
| @@ -578,7 +579,8 @@ int AutofillDialogViews::OverlayView::GetHeightForContentsForWidth(int width) {
|
| }
|
|
|
| void AutofillDialogViews::OverlayView::UpdateState() {
|
| - const DialogOverlayState& state = delegate_->GetDialogOverlay();
|
| + const DialogOverlayState& state =
|
| + delegate_->GetDialogOverlay(GetNativeTheme());
|
|
|
| if (state.image.IsEmpty()) {
|
| SetVisible(false);
|
| @@ -654,10 +656,20 @@ void AutofillDialogViews::OverlayView::OnPaint(gfx::Canvas* canvas) {
|
| arrow.close();
|
|
|
| SkPaint paint;
|
| - paint.setColor(kShadingColor);
|
| + SkColor background_color = background()->get_color();
|
| + int background_luminance =
|
| + color_utils::GetLuminanceForColor(background_color);
|
| + int background_alpha = static_cast<int>(
|
| + 7 + 15 * (255 - background_luminance) / 255);
|
| + int subtle_border_alpha = static_cast<int>(
|
| + 10 + 20 * (255 - background_luminance) / 255);
|
| +
|
| + paint.setColor(color_utils::BlendTowardOppositeLuminance(
|
| + background_color, background_alpha));
|
| paint.setStyle(SkPaint::kFill_Style);
|
| canvas->DrawPath(arrow, paint);
|
| - paint.setColor(kSubtleBorderColor);
|
| + paint.setColor(color_utils::BlendTowardOppositeLuminance(
|
| + background_color, subtle_border_alpha));
|
| paint.setStyle(SkPaint::kStroke_Style);
|
| canvas->DrawPath(arrow, paint);
|
| }
|
|
|