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

Side by Side Diff: chrome/browser/ui/cocoa/side_tab_strip_view.mm

Issue 6362007: [Mac] Organize all tab/tab strip files into chrome/browser/ui/cocoa/tabs/.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #import "chrome/browser/ui/cocoa/side_tab_strip_view.h"
6
7 #include "base/scoped_nsobject.h"
8 #import "third_party/GTM/AppKit/GTMNSColor+Luminance.h"
9
10 @implementation SideTabStripView
11
12 - (void)drawBorder:(NSRect)bounds {
13 // Draw a border on the right side.
14 NSRect borderRect, contentRect;
15 NSDivideRect(bounds, &borderRect, &contentRect, 1, NSMaxXEdge);
16 [[NSColor colorWithCalibratedWhite:0.0 alpha:0.2] set];
17 NSRectFillUsingOperation(borderRect, NSCompositeSourceOver);
18 }
19
20 // Override to prevent double-clicks from minimizing the window. The side
21 // tab strip doesn't have that behavior (since it's in the window content
22 // area).
23 - (BOOL)doubleClickMinimizesWindow {
24 return NO;
25 }
26
27 - (void)drawRect:(NSRect)rect {
28 // BOOL isKey = [[self window] isKeyWindow];
29 NSColor* aColor =
30 [NSColor colorWithCalibratedRed:0.506 green:0.660 blue:0.985 alpha:1.000];
31 NSColor* bColor =
32 [NSColor colorWithCalibratedRed:0.099 green:0.140 blue:0.254 alpha:1.000];
33 scoped_nsobject<NSGradient> gradient(
34 [[NSGradient alloc] initWithStartingColor:aColor endingColor:bColor]);
35
36 NSRect gradientRect = [self bounds];
37 [gradient drawInRect:gradientRect angle:270.0];
38
39 // Draw borders and any drop feedback.
40 [super drawRect:rect];
41 }
42
43 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/side_tab_strip_view.h ('k') | chrome/browser/ui/cocoa/side_tab_strip_view_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698