diff options
author | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-27 16:34:45 +0000 |
---|---|---|
committer | pinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-27 16:34:45 +0000 |
commit | 31f2bff6d9c109d6b4eb91cc0549c9d5b076ed5c (patch) | |
tree | 25f89dfb2e4cf781d019f839ac7dd320f196e234 /chrome/browser/cocoa/tab_cell.mm | |
parent | 280a4207de1c817dc7177cd75b6e7b295092ce30 (diff) | |
download | chromium_src-31f2bff6d9c109d6b4eb91cc0549c9d5b076ed5c.zip chromium_src-31f2bff6d9c109d6b4eb91cc0549c9d5b076ed5c.tar.gz chromium_src-31f2bff6d9c109d6b4eb91cc0549c9d5b076ed5c.tar.bz2 |
Hook up close button in tabs. Patch from rohitrao@google.com.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12656 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/tab_cell.mm')
-rw-r--r-- | chrome/browser/cocoa/tab_cell.mm | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/chrome/browser/cocoa/tab_cell.mm b/chrome/browser/cocoa/tab_cell.mm index f5895d3..0600c21 100644 --- a/chrome/browser/cocoa/tab_cell.mm +++ b/chrome/browser/cocoa/tab_cell.mm @@ -119,38 +119,6 @@ inView:controlView]; } -- (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView { - [super drawInteriorWithFrame:cellFrame inView:controlView]; - - void* voidContext = [[NSGraphicsContext currentContext] graphicsPort]; - CGContextRef c = static_cast<CGContextRef>(voidContext); - - // Build the rect for where we draw the close (x). - // TODO(alcor): This should be retrieved from a method that can also be called - // for hit-testing. Right now it also will overlap content if the page title - // is wide enough. - const int kCloseRectSize = 8; - NSRect closeRect, restRect; - NSDivideRect(cellFrame, &closeRect, &restRect, NSHeight(cellFrame), - NSMaxXEdge); - closeRect = NSInsetRect(closeRect, kCloseRectSize, kCloseRectSize); - - NSGradient *gradient = - [[GTMTheme defaultTheme] gradientForStyle:GTMThemeStyleTabBarSelected - active:YES]; - NSColor *color = [gradient interpolatedColorAtLocation:0.5]; - CGFloat luminance = [color gtm_luminance]; - - // Draw the (x). Fade the images as they move toward the contrasty ends of - // the spectrum - CGContextSetAlpha(c, 1.0 - fabsf(0.5 - luminance)); - CGContextBeginTransparencyLayer(c, NULL); - [self drawImage:[NSImage imageNamed:@"NSStopProgressTemplate"] - withFrame:closeRect - inView:controlView]; - CGContextEndTransparencyLayer(c); -} - - (void)highlight:(BOOL)flag withFrame:(NSRect)cellFrame inView:(NSView *)controlView { |