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

Unified Diff: ui/native_theme/native_theme_win.cc

Issue 2077803002: Modify the ommnibox dropdown colors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@theme_cleanup
Patch Set: Created 4 years, 6 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/omnibox/omnibox_result_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/native_theme/native_theme_win.cc
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
index dc854900b38903d8ee9d8dc3f53a5e21acac71ef..69954dd8d2bedcede4e6fb5a7c83566b33f0be09 100644
--- a/ui/native_theme/native_theme_win.cc
+++ b/ui/native_theme/native_theme_win.cc
@@ -465,7 +465,8 @@ void NativeThemeWin::PaintDirect(SkCanvas* canvas,
}
SkColor NativeThemeWin::GetSystemColor(ColorId color_id) const {
- if (!ui::MaterialDesignController::IsModeMaterial()) {
+ const bool md = ui::MaterialDesignController::IsModeMaterial();
+ if (!md) {
// Link:
const SkColor kLinkPressedColor = SkColorSetRGB(200, 0, 0);
@@ -501,7 +502,9 @@ SkColor NativeThemeWin::GetSystemColor(ColorId color_id) const {
const SkColor kPositiveTextColor = SkColorSetRGB(0x0b, 0x80, 0x43);
const SkColor kNegativeTextColor = SkColorSetRGB(0xc5, 0x39, 0x29);
// Results Tables:
- const SkColor kResultsTableUrlColor = SkColorSetRGB(0x0b, 0x80, 0x43);
+ const SkColor kResultsTableUrlColor =
+ md ? gfx::kGoogleBlue700 : SkColorSetRGB(0x0b, 0x80, 0x43);
+ const SkColor kResultsTableSelectedUrlColor = SK_ColorWHITE;
switch (color_id) {
// Windows
@@ -624,12 +627,13 @@ SkColor NativeThemeWin::GetSystemColor(ColorId color_id) const {
return color_utils::GetReadableColor(kResultsTableUrlColor,
system_colors_[COLOR_WINDOW]);
case kColorId_ResultsTableHoveredUrl:
- return color_utils::GetReadableColor(
- kResultsTableUrlColor,
+ return color_utils::PickContrastingColor(
+ kResultsTableUrlColor, kResultsTableSelectedUrlColor,
GetSystemColor(kColorId_ResultsTableHoveredBackground));
case kColorId_ResultsTableSelectedUrl:
- return color_utils::GetReadableColor(kResultsTableUrlColor,
- system_colors_[COLOR_HIGHLIGHT]);
+ return color_utils::PickContrastingColor(
+ kResultsTableUrlColor, kResultsTableSelectedUrlColor,
+ system_colors_[COLOR_HIGHLIGHT]);
case kColorId_ResultsTablePositiveText:
return color_utils::GetReadableColor(kPositiveTextColor,
system_colors_[COLOR_WINDOW]);
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_result_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698