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

Unified Diff: chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc

Issue 2581513002: Replace hard-coded colors from ui::NativeTheme for consistency and accessibility. (Closed)
Patch Set: Resolved conflicts during patching Created 3 years, 11 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
« no previous file with comments | « chrome/browser/ui/views/autofill/autofill_popup_view_views.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc
diff --git a/chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc b/chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc
index f70522404510cd2c3bf99056c587f8f142e6bd45..f7f9a962c056a265cca43c34140c496cfe4fa03b 100644
--- a/chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc
+++ b/chrome/browser/ui/views/autofill/password_generation_popup_view_views.cc
@@ -14,6 +14,7 @@
#include "ui/gfx/color_palette.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/gfx/vector_icons_public.h"
+#include "ui/native_theme/native_theme.h"
#include "ui/views/background.h"
#include "ui/views/border.h"
#include "ui/views/controls/image_view.h"
@@ -153,7 +154,9 @@ PasswordGenerationPopupViewViews::PasswordGenerationPopupViewViews(
PasswordGenerationPopupController::kHorizontalPadding));
AddChildView(help_label_);
- set_background(views::Background::CreateSolidBackground(kPopupBackground));
+ set_background(views::Background::CreateSolidBackground(
+ GetNativeTheme()->GetSystemColor(
+ ui::NativeTheme::kColorId_ResultsTableNormalBackground)));
}
PasswordGenerationPopupViewViews::~PasswordGenerationPopupViewViews() {}
@@ -209,9 +212,10 @@ void PasswordGenerationPopupViewViews::PasswordSelectionUpdated() {
password_view_->set_background(
views::Background::CreateSolidBackground(
- controller_->password_selected() ?
- kHoveredBackgroundColor :
- kPopupBackground));
+ GetNativeTheme()->GetSystemColor(
+ controller_->password_selected() ?
+ ui::NativeTheme::kColorId_ResultsTableHoveredBackground :
+ ui::NativeTheme::kColorId_ResultsTableNormalBackground)));
}
void PasswordGenerationPopupViewViews::Layout() {
« no previous file with comments | « chrome/browser/ui/views/autofill/autofill_popup_view_views.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698