OLD | NEW |
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/styled_text_field_cell.h" | 5 #import "chrome/browser/cocoa/styled_text_field_cell.h" |
6 | 6 |
7 #include "app/gfx/font.h" | |
8 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
9 #include "base/logging.h" | 8 #include "base/logging.h" |
10 #include "chrome/browser/browser_theme_provider.h" | 9 #include "chrome/browser/browser_theme_provider.h" |
11 #import "chrome/browser/cocoa/themed_window.h" | 10 #import "chrome/browser/cocoa/themed_window.h" |
| 11 #include "gfx/font.h" |
12 #include "grit/theme_resources.h" | 12 #include "grit/theme_resources.h" |
13 | 13 |
14 @implementation StyledTextFieldCell | 14 @implementation StyledTextFieldCell |
15 | 15 |
16 - (CGFloat)baselineAdjust { | 16 - (CGFloat)baselineAdjust { |
17 return 0.0; | 17 return 0.0; |
18 } | 18 } |
19 | 19 |
20 // Returns the same value as textCursorFrameForFrame, but does not call it | 20 // Returns the same value as textCursorFrameForFrame, but does not call it |
21 // directly to avoid potential infinite loops. | 21 // directly to avoid potential infinite loops. |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 if ([self showsFirstResponder]) { | 100 if ([self showsFirstResponder]) { |
101 [[[NSColor keyboardFocusIndicatorColor] colorWithAlphaComponent:0.5] set]; | 101 [[[NSColor keyboardFocusIndicatorColor] colorWithAlphaComponent:0.5] set]; |
102 NSFrameRectWithWidthUsingOperation(NSInsetRect(frame, 0, 0), 2, | 102 NSFrameRectWithWidthUsingOperation(NSInsetRect(frame, 0, 0), 2, |
103 NSCompositeSourceOver); | 103 NSCompositeSourceOver); |
104 } | 104 } |
105 | 105 |
106 [self drawInteriorWithFrame:cellFrame inView:controlView]; | 106 [self drawInteriorWithFrame:cellFrame inView:controlView]; |
107 } | 107 } |
108 | 108 |
109 @end | 109 @end |
OLD | NEW |