From 33395478c239bb3ecd0310b7b8f85c330efcd9df Mon Sep 17 00:00:00 2001 From: "shess@chromium.org" Date: Thu, 3 Mar 2011 22:35:03 +0000 Subject: [Mac] Task manager alternating colors for background pages. Previously all the background pages showed as a uniform color. This alternates like the regular table view, based on that color. BUG=none TEST=Alternating rows should continue the same pattern. Review URL: http://codereview.chromium.org/6596090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76816 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/ui/cocoa/task_manager_mac.mm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'chrome/browser/ui/cocoa') diff --git a/chrome/browser/ui/cocoa/task_manager_mac.mm b/chrome/browser/ui/cocoa/task_manager_mac.mm index 6a937bd..45fcea6 100644 --- a/chrome/browser/ui/cocoa/task_manager_mac.mm +++ b/chrome/browser/ui/cocoa/task_manager_mac.mm @@ -394,8 +394,13 @@ class SortHelper { if ([cell respondsToSelector:@selector(setBackgroundColor:)]) { NSColor* color = nil; if (taskManagerObserver_->IsBackgroundRow(viewToModelMap_[row]) && - ![tableView isRowSelected:row]) + ![tableView isRowSelected:row]) { color = backgroundResourceColor_.get(); + if ((row % 2) == 1 && [tableView usesAlternatingRowBackgroundColors]) { + color = [color blendedColorWithFraction:0.05 + ofColor:[NSColor blackColor]]; + } + } [cell setBackgroundColor:color]; // The icon at the left is an |NSButtonCell|, which does not -- cgit v1.1