OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/styled_text_field_cell.h" | 5 #import "chrome/browser/ui/cocoa/styled_text_field_cell.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/themes/browser_theme_provider.h" | 8 #include "chrome/browser/themes/browser_theme_provider.h" |
9 #import "chrome/browser/ui/cocoa/themed_window.h" | 9 #import "chrome/browser/ui/cocoa/themed_window.h" |
10 #include "gfx/font.h" | |
11 #include "grit/theme_resources.h" | 10 #include "grit/theme_resources.h" |
12 #import "third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.h" | 11 #import "third_party/GTM/AppKit/GTMNSBezierPath+RoundRect.h" |
13 #include "ui/base/resource/resource_bundle.h" | 12 #include "ui/base/resource/resource_bundle.h" |
| 13 #include "ui/gfx/font.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 NSBezierPath* RectPathWithInset(StyledTextFieldCellRoundedFlags roundedFlags, | 17 NSBezierPath* RectPathWithInset(StyledTextFieldCellRoundedFlags roundedFlags, |
18 const NSRect frame, | 18 const NSRect frame, |
19 const CGFloat inset, | 19 const CGFloat inset, |
20 const CGFloat outerRadius) { | 20 const CGFloat outerRadius) { |
21 NSRect insetFrame = NSInsetRect(frame, inset, inset); | 21 NSRect insetFrame = NSInsetRect(frame, inset, inset); |
22 | 22 |
23 if (outerRadius > 0.0) { | 23 if (outerRadius > 0.0) { |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 if ([self showsFirstResponder]) { | 208 if ([self showsFirstResponder]) { |
209 NSColor* color = | 209 NSColor* color = |
210 [[NSColor keyboardFocusIndicatorColor] colorWithAlphaComponent:0.5]; | 210 [[NSColor keyboardFocusIndicatorColor] colorWithAlphaComponent:0.5]; |
211 FrameRectWithInset(roundedFlags, frame, 0.0, radius, 2.0, color); | 211 FrameRectWithInset(roundedFlags, frame, 0.0, radius, 2.0, color); |
212 } | 212 } |
213 | 213 |
214 [self drawInteriorWithFrame:cellFrame inView:controlView]; | 214 [self drawInteriorWithFrame:cellFrame inView:controlView]; |
215 } | 215 } |
216 | 216 |
217 @end | 217 @end |
OLD | NEW |