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/GTM/AppKit/GTMNSBezierPath+RoundRect.h" |
10 #import "third_party/GTM/AppKit/GTMNSColor+Luminance.h" | 10 #import "third_party/GTM/AppKit/GTMNSColor+Luminance.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 97 |
98 [[NSColor colorWithDeviceWhite:kWindowEdge alpha:1.0f] set]; | 98 [[NSColor colorWithDeviceWhite:kWindowEdge alpha:1.0f] set]; |
99 [border stroke]; | 99 [border stroke]; |
100 | 100 |
101 // Text | 101 // Text |
102 NSColor* textColor = [NSColor blackColor]; | 102 NSColor* textColor = [NSColor blackColor]; |
103 if (themeProvider) | 103 if (themeProvider) |
104 textColor = themeProvider->GetNSColor(ThemeProperties::COLOR_TAB_TEXT, | 104 textColor = themeProvider->GetNSColor(ThemeProperties::COLOR_TAB_TEXT, |
105 true); | 105 true); |
106 NSFont* textFont = [self font]; | 106 NSFont* textFont = [self font]; |
107 scoped_nsobject<NSShadow> textShadow([[NSShadow alloc] init]); | 107 base::scoped_nsobject<NSShadow> textShadow([[NSShadow alloc] init]); |
108 [textShadow setShadowBlurRadius:0.0f]; | 108 [textShadow setShadowBlurRadius:0.0f]; |
109 [textShadow.get() setShadowColor:[textColor gtm_legibleTextColor]]; | 109 [textShadow.get() setShadowColor:[textColor gtm_legibleTextColor]]; |
110 [textShadow.get() setShadowOffset:NSMakeSize(0.0f, -1.0f)]; | 110 [textShadow.get() setShadowOffset:NSMakeSize(0.0f, -1.0f)]; |
111 | 111 |
112 NSDictionary* textDict = [NSDictionary dictionaryWithObjectsAndKeys: | 112 NSDictionary* textDict = [NSDictionary dictionaryWithObjectsAndKeys: |
113 textColor, NSForegroundColorAttributeName, | 113 textColor, NSForegroundColorAttributeName, |
114 textFont, NSFontAttributeName, | 114 textFont, NSFontAttributeName, |
115 textShadow.get(), NSShadowAttributeName, | 115 textShadow.get(), NSShadowAttributeName, |
116 nil]; | 116 nil]; |
117 [content_ drawAtPoint:NSMakePoint(kBubbleViewTextPositionX, | 117 [content_ drawAtPoint:NSMakePoint(kBubbleViewTextPositionX, |
118 kBubbleViewTextPositionY) | 118 kBubbleViewTextPositionY) |
119 withAttributes:textDict]; | 119 withAttributes:textDict]; |
120 } | 120 } |
121 | 121 |
122 @end | 122 @end |
OLD | NEW |