summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/cocoa
diff options
context:
space:
mode:
authorshess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-03 22:35:03 +0000
committershess@chromium.org <shess@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-03 22:35:03 +0000
commit33395478c239bb3ecd0310b7b8f85c330efcd9df (patch)
tree74bdf4642d81efa203522342c46d302531ae52a7 /chrome/browser/ui/cocoa
parent8663293a9eecd27fb9e76c1f74fd73831a59d8d5 (diff)
downloadchromium_src-33395478c239bb3ecd0310b7b8f85c330efcd9df.zip
chromium_src-33395478c239bb3ecd0310b7b8f85c330efcd9df.tar.gz
chromium_src-33395478c239bb3ecd0310b7b8f85c330efcd9df.tar.bz2
[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
Diffstat (limited to 'chrome/browser/ui/cocoa')
-rw-r--r--chrome/browser/ui/cocoa/task_manager_mac.mm7
1 files changed, 6 insertions, 1 deletions
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