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

Unified Diff: chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm

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
Index: chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm b/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm
index 30745dedbf726cc8228797ab3a6ac3681f51156b..f06cf3e7b018ee905975070617f48821ea24dd92 100644
--- a/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm
+++ b/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm
@@ -10,7 +10,6 @@
#include "base/strings/utf_string_conversions.h"
#include "chrome/browser/ui/autofill/autofill_popup_controller.h"
#include "chrome/browser/ui/autofill/autofill_popup_layout_model.h"
-#include "chrome/browser/ui/autofill/popup_constants.h"
#include "chrome/browser/ui/cocoa/autofill/autofill_popup_view_bridge.h"
#include "components/autofill/core/browser/popup_item_ids.h"
#include "components/autofill/core/browser/suggestion.h"
@@ -26,6 +25,8 @@
#include "ui/gfx/image/image_skia_util_mac.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/gfx/vector_icons_public.h"
+#include "ui/native_theme/native_theme.h"
+#include "ui/native_theme/native_theme_mac.h"
using autofill::AutofillPopupView;
using autofill::AutofillPopupLayoutModel;
@@ -170,7 +171,9 @@ using autofill::AutofillPopupLayoutModel;
[[self highlightColor] set];
[NSBezierPath fillRect:bounds];
} else {
- SkColor backgroundColor = controller_->GetBackgroundColorForRow(index);
+ SkColor backgroundColor =
+ ui::NativeTheme::GetInstanceForNativeUi()->GetSystemColor(
+ controller_->GetBackgroundColorIDForRow(index));
[skia::SkColorToSRGBNSColor(backgroundColor) set];
[NSBezierPath fillRect:bounds];
}
@@ -213,7 +216,8 @@ using autofill::AutofillPopupLayoutModel;
bounds:(NSRect)bounds
textYOffset:(CGFloat)textYOffset {
NSColor* nameColor = skia::SkColorToSRGBNSColor(
- controller_->layout_model().GetValueFontColorForRow(index));
+ ui::NativeTheme::GetInstanceForNativeUi()->GetSystemColor(
+ controller_->layout_model().GetValueFontColorIDForRow(index)));
NSDictionary* nameAttributes = [NSDictionary
dictionaryWithObjectsAndKeys:controller_->layout_model()
.GetValueFontListForRow(index)
« no previous file with comments | « chrome/browser/ui/autofill/popup_constants.h ('k') | chrome/browser/ui/views/autofill/autofill_popup_base_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698