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/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/theme_properties.h" | 8 #include "chrome/browser/themes/theme_properties.h" |
9 #include "chrome/browser/themes/theme_service.h" | 9 #include "chrome/browser/themes/theme_service.h" |
10 #import "chrome/browser/ui/cocoa/nsview_additions.h" | 10 #import "chrome/browser/ui/cocoa/nsview_additions.h" |
11 #import "chrome/browser/ui/cocoa/themed_window.h" | 11 #import "chrome/browser/ui/cocoa/themed_window.h" |
12 #include "grit/theme_resources.h" | 12 #include "grit/theme_resources.h" |
13 #import "ui/base/cocoa/nsgraphics_context_additions.h" | 13 #import "ui/base/cocoa/nsgraphics_context_additions.h" |
14 #include "ui/base/resource/resource_bundle.h" | |
15 #include "ui/gfx/font.h" | 14 #include "ui/gfx/font.h" |
16 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" | 15 #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" |
17 | 16 |
18 @implementation StyledTextFieldCell | 17 @implementation StyledTextFieldCell |
19 | 18 |
20 - (CGFloat)topTextFrameOffset { | 19 - (CGFloat)topTextFrameOffset { |
21 return 0.0; | 20 return 0.0; |
22 } | 21 } |
23 | 22 |
24 - (CGFloat)bottomTextFrameOffset { | 23 - (CGFloat)bottomTextFrameOffset { |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 // Draw the focus ring if needed. | 166 // Draw the focus ring if needed. |
168 if ([self showsFirstResponder]) { | 167 if ([self showsFirstResponder]) { |
169 NSColor* color = [[NSColor keyboardFocusIndicatorColor] | 168 NSColor* color = [[NSColor keyboardFocusIndicatorColor] |
170 colorWithAlphaComponent:0.5 / lineWidth]; | 169 colorWithAlphaComponent:0.5 / lineWidth]; |
171 rect_path_utils::FrameRectWithInset(roundedCornerFlags, frame, 0.0, 0.0, | 170 rect_path_utils::FrameRectWithInset(roundedCornerFlags, frame, 0.0, 0.0, |
172 radius, lineWidth * 2, color); | 171 radius, lineWidth * 2, color); |
173 } | 172 } |
174 } | 173 } |
175 | 174 |
176 @end | 175 @end |
OLD | NEW |