Index: chrome/browser/ui/cocoa/download/download_shelf_view_cocoa.mm |
diff --git a/chrome/browser/ui/cocoa/download/download_shelf_view_cocoa.mm b/chrome/browser/ui/cocoa/download/download_shelf_view_cocoa.mm |
index 92dd23f985a34f5e67b16ecb8617858b0119cd8e..a6f6c0df825136975f48fff0164c3407a2fbda37 100644 |
--- a/chrome/browser/ui/cocoa/download/download_shelf_view_cocoa.mm |
+++ b/chrome/browser/ui/cocoa/download/download_shelf_view_cocoa.mm |
@@ -16,7 +16,7 @@ |
// For programmatic instantiations in unit tests. |
- (id)initWithFrame:(NSRect)frameRect { |
if ((self = [super initWithFrame:frameRect])) { |
- [self setShowsDivider:NO]; |
+ self.dividerEdge = NSMaxYEdge; |
} |
return self; |
} |
@@ -24,26 +24,11 @@ |
// For nib instantiations in production. |
- (id)initWithCoder:(NSCoder*)decoder { |
if ((self = [super initWithCoder:decoder])) { |
- [self setShowsDivider:NO]; |
+ self.dividerEdge = NSMaxYEdge; |
} |
return self; |
} |
-- (NSColor*)strokeColor { |
- const ui::ThemeProvider* themeProvider = [[self window] themeProvider]; |
- if (!themeProvider) { |
- return [NSColor blackColor]; |
- } |
- if (!ui::MaterialDesignController::IsModeMaterial()) { |
- BOOL isActive = [[self window] isMainWindow]; |
- return themeProvider->GetNSColor( |
- isActive ? ThemeProperties::COLOR_TOOLBAR_STROKE : |
- ThemeProperties::COLOR_TOOLBAR_STROKE_INACTIVE); |
- } |
- return themeProvider->GetNSColor( |
- ThemeProperties::COLOR_DETACHED_BOOKMARK_BAR_SEPARATOR); |
-} |
- |
- (NSPoint)patternPhase { |
// We want our backgrounds for the shelf to be phased from the upper |
// left hand corner of the view. Offset it by tab height so that the |
@@ -55,17 +40,10 @@ |
- (void)drawRect:(NSRect)dirtyRect { |
[super drawRect:dirtyRect]; |
- // Draw top stroke |
+ // Draw the top highlight |
NSRect borderRect, contentRect; |
NSDivideRect([self bounds], &borderRect, &contentRect, [self cr_lineWidth], |
NSMaxYEdge); |
- if (NSIntersectsRect(borderRect, dirtyRect)) { |
- [[self strokeColor] set]; |
- NSRectFillUsingOperation(NSIntersectionRect(borderRect, dirtyRect), |
- NSCompositeSourceOver); |
- } |
- |
- // Draw the top highlight |
borderRect.origin.y -= [self cr_lineWidth]; |
if (NSIntersectsRect(borderRect, dirtyRect)) { |
const ui::ThemeProvider* themeProvider = [[self window] themeProvider]; |