OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/cocoa/info_bubble_view.h" | 5 #import "chrome/browser/ui/cocoa/info_bubble_view.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_nsobject.h" | 8 #include "base/memory/scoped_nsobject.h" |
9 | 9 |
10 @implementation InfoBubbleView | 10 @implementation InfoBubbleView |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
55 [bezier moveToPoint:NSMakePoint(arrowStart.x, arrowStart.y)]; | 55 [bezier moveToPoint:NSMakePoint(arrowStart.x, arrowStart.y)]; |
56 if (arrowLocation_ != info_bubble::kNoArrow) { | 56 if (arrowLocation_ != info_bubble::kNoArrow) { |
57 [bezier lineToPoint:NSMakePoint(arrowStart.x + | 57 [bezier lineToPoint:NSMakePoint(arrowStart.x + |
58 info_bubble::kBubbleArrowWidth / 2.0, | 58 info_bubble::kBubbleArrowWidth / 2.0, |
59 arrowStart.y + | 59 arrowStart.y + |
60 info_bubble::kBubbleArrowHeight)]; | 60 info_bubble::kBubbleArrowHeight)]; |
61 } | 61 } |
62 [bezier lineToPoint:NSMakePoint(arrowStart.x + info_bubble::kBubbleArrowWidth, | 62 [bezier lineToPoint:NSMakePoint(arrowStart.x + info_bubble::kBubbleArrowWidth, |
63 arrowStart.y)]; | 63 arrowStart.y)]; |
64 [bezier closePath]; | 64 [bezier closePath]; |
65 [[NSColor colorWithCalibratedWhite:1.0 alpha:0.9] set]; | 65 [[NSColor whiteColor] set]; |
Robert Sesek
2012/07/25 17:54:23
What happens if you leave this? The UI people like
sail
2012/07/25 18:23:14
Hi Robert, here's some screenshots with 0.9 alpha:
Robert Sesek
2012/07/25 18:24:59
It's unfortunate that we have to ditch the blur. B
sail
2012/07/25 18:43:21
This is at 0.96 which seems more readable to me
| |
66 [bezier fill]; | 66 [bezier fill]; |
67 } | 67 } |
68 | 68 |
69 - (NSPoint)arrowTip { | 69 - (NSPoint)arrowTip { |
70 NSRect bounds = [self bounds]; | 70 NSRect bounds = [self bounds]; |
71 CGFloat tipXOffset = | 71 CGFloat tipXOffset = |
72 info_bubble::kBubbleArrowXOffset + info_bubble::kBubbleArrowWidth / 2.0; | 72 info_bubble::kBubbleArrowXOffset + info_bubble::kBubbleArrowWidth / 2.0; |
73 CGFloat xOffset = | 73 CGFloat xOffset = |
74 (arrowLocation_ == info_bubble::kTopRight) ? NSMaxX(bounds) - tipXOffset : | 74 (arrowLocation_ == info_bubble::kTopRight) ? NSMaxX(bounds) - tipXOffset : |
75 NSMinX(bounds) + tipXOffset; | 75 NSMinX(bounds) + tipXOffset; |
76 NSPoint arrowTip = NSMakePoint(xOffset, NSMaxY(bounds)); | 76 NSPoint arrowTip = NSMakePoint(xOffset, NSMaxY(bounds)); |
77 return arrowTip; | 77 return arrowTip; |
78 } | 78 } |
79 | 79 |
80 @end | 80 @end |
OLD | NEW |