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

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

Issue 1623002: Change how the calculation is performed for determining the location of the a... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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/info_bubble_view.h ('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 #import "chrome/browser/cocoa/info_bubble_view.h" 5 #import "chrome/browser/cocoa/info_bubble_view.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/scoped_nsobject.h" 8 #include "base/scoped_nsobject.h"
9 #import "third_party/GTM/AppKit/GTMNSColor+Luminance.h" 9 #import "third_party/GTM/AppKit/GTMNSColor+Luminance.h"
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 glowColor, 0.75, 85 glowColor, 0.75,
86 nil]); 86 nil]);
87 87
88 [gradient.get() drawInBezierPath:bezier angle:0.0]; 88 [gradient.get() drawInBezierPath:bezier angle:0.0];
89 } else if (bubbleType_ == kWhiteInfoBubble) { 89 } else if (bubbleType_ == kWhiteInfoBubble) {
90 [[NSColor whiteColor] set]; 90 [[NSColor whiteColor] set];
91 [bezier fill]; 91 [bezier fill];
92 } 92 }
93 } 93 }
94 94
95 - (NSPoint)arrowTip {
96 NSRect bounds = [self bounds];
97 NSPoint arrowTip = NSMakePoint(NSMaxX(bounds), NSMaxY(bounds));
98 CGFloat tipXOffset = kBubbleArrowXOffset + kBubbleArrowWidth / 2.0;
99 switch (arrowLocation_) {
100 case kTopLeft:
101 arrowTip.x = tipXOffset;
102 break;
103 case kTopRight:
104 arrowTip.x -= tipXOffset;
105 break;
106 default:
107 NOTREACHED();
108 break;
109 }
110 return arrowTip;
111 }
112
95 @end 113 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/info_bubble_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698