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

Unified Diff: ui/app_list/cocoa/apps_search_results_controller.mm

Issue 1023983002: Fix background colour for Cocoa app list on hover (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Actually just fix it Created 5 years, 9 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 | « ui/app_list/app_list_constants.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/cocoa/apps_search_results_controller.mm
diff --git a/ui/app_list/cocoa/apps_search_results_controller.mm b/ui/app_list/cocoa/apps_search_results_controller.mm
index 95f293f0d71ce473cf207208a4304076ca97b60c..304eb066c064221c29fdf7cc77dbdd2c95ae02bb 100644
--- a/ui/app_list/cocoa/apps_search_results_controller.mm
+++ b/ui/app_list/cocoa/apps_search_results_controller.mm
@@ -29,6 +29,11 @@ const NSBackgroundStyle kBackgroundNormal = NSBackgroundStyleLight;
const NSBackgroundStyle kBackgroundSelected = NSBackgroundStyleDark;
const NSBackgroundStyle kBackgroundHovered = NSBackgroundStyleRaised;
+// The mouse hover colour (3% black over kContentsBackgroundColor).
+const SkColor kHighlightedRowColor = SkColorSetRGB(0xEE, 0xEE, 0xEE);
+// The keyboard select colour (6% black over kContentsBackgroundColor).
+const SkColor kSelectedRowColor = SkColorSetRGB(0xE6, 0xE6, 0xE6);
+
} // namespace
@interface AppsSearchResultsController ()
@@ -421,9 +426,9 @@ const NSBackgroundStyle kBackgroundHovered = NSBackgroundStyleRaised;
inView:(NSView*)controlView {
if ([self backgroundStyle] != kBackgroundNormal) {
if ([self backgroundStyle] == kBackgroundSelected)
- [gfx::SkColorToSRGBNSColor(app_list::kSelectedColor) set];
+ [gfx::SkColorToSRGBNSColor(kSelectedRowColor) set];
else
- [gfx::SkColorToSRGBNSColor(app_list::kHighlightedColor) set];
+ [gfx::SkColorToSRGBNSColor(kHighlightedRowColor) set];
// Extend up by one pixel to draw over cell border.
NSRect backgroundRect = cellFrame;
« no previous file with comments | « ui/app_list/app_list_constants.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698