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

Side by Side Diff: chrome/browser/cocoa/tab_view.mm

Issue 160194: Fix gradient drawing on the Mac. (Base coordinate system != window base coord... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 5 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
« no previous file with comments | « chrome/browser/cocoa/background_gradient_view.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "chrome/browser/cocoa/nsimage_cache.h" 5 #include "chrome/browser/cocoa/nsimage_cache.h"
6 #include "chrome/browser/cocoa/tab_controller.h" 6 #include "chrome/browser/cocoa/tab_controller.h"
7 #include "chrome/browser/cocoa/tab_view.h" 7 #include "chrome/browser/cocoa/tab_view.h"
8 #include "chrome/browser/cocoa/tab_window_controller.h" 8 #include "chrome/browser/cocoa/tab_window_controller.h"
9 9
10 10
11 // Constants for inset and control points for tab shape. 11 // Constants for inset and control points for tab shape.
12 static const CGFloat kInsetMultiplier = 2.0/3.0; 12 static const CGFloat kInsetMultiplier = 2.0/3.0;
13 static const CGFloat kControlPoint1Multiplier = 1.0/3.0; 13 static const CGFloat kControlPoint1Multiplier = 1.0/3.0;
14 static const CGFloat kControlPoint2Multiplier = 3.0/8.0; 14 static const CGFloat kControlPoint2Multiplier = 3.0/8.0;
15 15
16 static const CGFloat kToolbarTopOffset = 12;
17 static const CGFloat kToolbarMaxHeight = 128;
18
19 @implementation TabView 16 @implementation TabView
20 17
21 @synthesize state = state_; 18 @synthesize state = state_;
22 19
23 - (id)initWithFrame:(NSRect)frame { 20 - (id)initWithFrame:(NSRect)frame {
24 self = [super initWithFrame:frame]; 21 self = [super initWithFrame:frame];
25 if (self) { 22 if (self) {
26 chromeIsVisible_ = YES; 23 chromeIsVisible_ = YES;
27 [self setShowsDivider:NO]; 24 [self setShowsDivider:NO];
28 // TODO(alcor): register for theming, either here or the cell 25 // TODO(alcor): register for theming, either here or the cell
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 [[NSGraphicsContext currentContext] restoreGraphicsState]; 498 [[NSGraphicsContext currentContext] restoreGraphicsState];
502 } 499 }
503 500
504 // Called when the user hits the right mouse button (or control-clicks) to 501 // Called when the user hits the right mouse button (or control-clicks) to
505 // show a context menu. 502 // show a context menu.
506 - (void)rightMouseDown:(NSEvent*)theEvent { 503 - (void)rightMouseDown:(NSEvent*)theEvent {
507 [NSMenu popUpContextMenu:[self menu] withEvent:theEvent forView:self]; 504 [NSMenu popUpContextMenu:[self menu] withEvent:theEvent forView:self];
508 } 505 }
509 506
510 @end 507 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/background_gradient_view.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698