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

Unified Diff: chrome/browser/cocoa/tab_cell.mm

Issue 181002: Reverting 24700. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 4 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 | « chrome/browser/cocoa/status_bubble_mac_unittest.mm ('k') | chrome/browser/cocoa/tab_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/tab_cell.mm
===================================================================
--- chrome/browser/cocoa/tab_cell.mm (revision 24707)
+++ chrome/browser/cocoa/tab_cell.mm (working copy)
@@ -2,12 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#import "base/scoped_nsobject.h"
#import "chrome/browser/cocoa/tab_cell.h"
#import "third_party/GTM/AppKit/GTMTheme.h"
#import "third_party/GTM/AppKit/GTMNSColor+Luminance.h"
-
@implementation TabCell
- (id)initTextCell:(NSString *)aString {
@@ -20,7 +18,7 @@
- (NSBackgroundStyle)interiorBackgroundStyle {
return [[[self controlView] gtm_theme]
- interiorBackgroundStyleForStyle:GTMThemeStyleToolBar
+ interiorBackgroundStyleForStyle:GTMThemeStyleTabBarSelected
state:GTMThemeStateActiveWindow];
}
@@ -39,34 +37,6 @@
inView:controlView];
}
-- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView {
- GTMTheme* theme = [[self controlView] gtm_theme];
- NSColor* textColor = [theme textColorForStyle:GTMThemeStyleToolBar
- state:[self isHighlighted]];
-
- scoped_nsobject<NSShadow> textShadow([[NSShadow alloc] init]);
- [textShadow setShadowBlurRadius:0.0f];
- [textShadow setShadowColor:[textColor gtm_legibleTextColor]];
- [textShadow setShadowOffset:NSMakeSize(0.0f, -1.0f)];
-
- NSDictionary* attributes =
- [NSDictionary dictionaryWithObjectsAndKeys:
- [self font], NSFontAttributeName,
- textColor, NSForegroundColorAttributeName,
- textShadow.get(), NSShadowAttributeName,
- nil];
-
- [[self title] drawInRect:[self titleRectForBounds:cellFrame]
- withAttributes:attributes];
-
- NSRect imageBounds = NSZeroRect;
- imageBounds.size = [[self image] size];
- [[self image] drawInRect:[self imageRectForBounds:cellFrame]
- fromRect:imageBounds
- operation:NSCompositeSourceOver
- fraction:1.0];
-}
-
- (void)highlight:(BOOL)flag
withFrame:(NSRect)cellFrame
inView:(NSView *)controlView {
« no previous file with comments | « chrome/browser/cocoa/status_bubble_mac_unittest.mm ('k') | chrome/browser/cocoa/tab_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698