OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #import "chrome/browser/cocoa/download_item_cell.h" | 5 #import "chrome/browser/cocoa/download_item_cell.h" |
6 | 6 |
7 #include "app/gfx/canvas_paint.h" | 7 #include "app/gfx/canvas_paint.h" |
8 #include "app/gfx/text_elider.h" | 8 #include "app/gfx/text_elider.h" |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "base/mac_util.h" | 10 #include "base/mac_util.h" |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 NSBezierPath *triangle = [NSBezierPath bezierPath]; | 475 NSBezierPath *triangle = [NSBezierPath bezierPath]; |
476 [triangle moveToPoint:p1]; | 476 [triangle moveToPoint:p1]; |
477 [triangle lineToPoint:p2]; | 477 [triangle lineToPoint:p2]; |
478 [triangle lineToPoint:p3]; | 478 [triangle lineToPoint:p3]; |
479 [triangle closePath]; | 479 [triangle closePath]; |
480 | 480 |
481 NSGraphicsContext* context = [NSGraphicsContext currentContext]; | 481 NSGraphicsContext* context = [NSGraphicsContext currentContext]; |
482 [context saveGraphicsState]; | 482 [context saveGraphicsState]; |
483 | 483 |
484 scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]); | 484 scoped_nsobject<NSShadow> shadow([[NSShadow alloc] init]); |
485 [shadow setShadowColor:[NSColor whiteColor]]; | 485 [shadow.get() setShadowColor:[NSColor whiteColor]]; |
486 [shadow setShadowOffset:NSMakeSize(0, -1)]; | 486 [shadow.get() setShadowOffset:NSMakeSize(0, -1)]; |
487 [shadow setShadowBlurRadius:0.0]; | 487 [shadow setShadowBlurRadius:0.0]; |
488 [shadow set]; | 488 [shadow set]; |
489 | 489 |
490 NSColor* fill = [self isDropdownPartPressed] | 490 NSColor* fill = [self isDropdownPartPressed] |
491 ? [NSColor alternateSelectedControlTextColor] : themeTextColor; | 491 ? [NSColor alternateSelectedControlTextColor] : themeTextColor; |
492 [fill setFill]; | 492 [fill setFill]; |
493 | 493 |
494 [triangle fill]; | 494 [triangle fill]; |
495 | 495 |
496 [context restoreGraphicsState]; | 496 [context restoreGraphicsState]; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 } | 552 } |
553 return self; | 553 return self; |
554 } | 554 } |
555 | 555 |
556 - (void)setCurrentProgress:(NSAnimationProgress)progress { | 556 - (void)setCurrentProgress:(NSAnimationProgress)progress { |
557 [super setCurrentProgress:progress]; | 557 [super setCurrentProgress:progress]; |
558 [cell_ animation:self progressed:progress]; | 558 [cell_ animation:self progressed:progress]; |
559 } | 559 } |
560 | 560 |
561 @end | 561 @end |
OLD | NEW |