OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/bubble_view.h" | 5 #import "chrome/browser/ui/cocoa/bubble_view.h" |
6 | 6 |
7 #include "chrome/browser/themes/theme_properties.h" | 7 #include "chrome/browser/themes/theme_properties.h" |
8 #import "chrome/browser/ui/cocoa/themed_window.h" | 8 #import "chrome/browser/ui/cocoa/themed_window.h" |
9 #import "third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.h" | 9 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSBezierPath+RoundRect
.h" |
10 #import "third_party/GTM/AppKit/GTMNSColor+Luminance.h" | 10 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMNSColor+Luminance.h" |
11 #include "ui/base/theme_provider.h" | 11 #include "ui/base/theme_provider.h" |
12 | 12 |
13 // The roundedness of the edges of the bubble. This matches the value used on | 13 // The roundedness of the edges of the bubble. This matches the value used on |
14 // Lion for window corners. | 14 // Lion for window corners. |
15 const int kBubbleCornerRadius = 3; | 15 const int kBubbleCornerRadius = 3; |
16 const float kWindowEdge = 0.7f; | 16 const float kWindowEdge = 0.7f; |
17 | 17 |
18 @implementation BubbleView | 18 @implementation BubbleView |
19 | 19 |
20 // Designated initializer. |provider| is the window from which we get the | 20 // Designated initializer. |provider| is the window from which we get the |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 textColor, NSForegroundColorAttributeName, | 112 textColor, NSForegroundColorAttributeName, |
113 textFont, NSFontAttributeName, | 113 textFont, NSFontAttributeName, |
114 textShadow.get(), NSShadowAttributeName, | 114 textShadow.get(), NSShadowAttributeName, |
115 nil]; | 115 nil]; |
116 [content_ drawAtPoint:NSMakePoint(kBubbleViewTextPositionX, | 116 [content_ drawAtPoint:NSMakePoint(kBubbleViewTextPositionX, |
117 kBubbleViewTextPositionY) | 117 kBubbleViewTextPositionY) |
118 withAttributes:textDict]; | 118 withAttributes:textDict]; |
119 } | 119 } |
120 | 120 |
121 @end | 121 @end |
OLD | NEW |